@abaplint/core 2.95.40 → 2.95.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/abaplint.d.ts +11 -0
- package/build/src/index.js +4 -1
- package/build/src/registry.js +1 -1
- package/build/src/rules/downport.js +4 -1
- package/package.json +1 -1
package/build/abaplint.d.ts
CHANGED
|
@@ -1328,6 +1328,10 @@ declare class CustomizingTransaction extends AbstractObject {
|
|
|
1328
1328
|
getDescription(): string | undefined;
|
|
1329
1329
|
}
|
|
1330
1330
|
|
|
1331
|
+
export declare class CyclomaticComplexityStats {
|
|
1332
|
+
static run(obj: IObject): ICyclomaticComplexityResult[];
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1331
1335
|
declare class Dash extends Token {
|
|
1332
1336
|
static railroad(): string;
|
|
1333
1337
|
}
|
|
@@ -2799,6 +2803,13 @@ export declare interface IConfiguration {
|
|
|
2799
2803
|
readByKey(rule: string, key: string): any;
|
|
2800
2804
|
}
|
|
2801
2805
|
|
|
2806
|
+
declare interface ICyclomaticComplexityResult {
|
|
2807
|
+
file: IFile;
|
|
2808
|
+
pos: Position;
|
|
2809
|
+
name: string;
|
|
2810
|
+
count: number;
|
|
2811
|
+
}
|
|
2812
|
+
|
|
2802
2813
|
declare interface IDDICReferences {
|
|
2803
2814
|
setUsing(obj: IObject, using: readonly IObjectAndToken[]): void;
|
|
2804
2815
|
addUsing(obj: IObject, using: IObjectAndToken | undefined): void;
|
package/build/src/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Severity = exports.Visibility = exports.Info = exports.Rename = exports.PrettyPrinter = exports.Position = exports.CurrentScope = exports.ABAPFile = exports.RulesRunner = exports.SpaghettiScope = exports.SyntaxLogic = exports.ABAPObject = exports.Tokens = exports.ExpressionsCDS = exports.CDSParser = exports.LanguageServerTypes = exports.DDLParser = exports.applyEditList = exports.applyEditSingle = exports.SpaghettiScopeNode = exports.AbstractFile = exports.Token = exports.ScopeType = exports.BasicTypes = exports.TypedIdentifier = exports.AbstractType = exports.VirtualPosition = exports.Comment = exports.Unknown = exports.Empty = exports.Identifier = exports.Nodes = exports.Types = exports.Expressions = exports.Statements = exports.Structures = exports.Objects = exports.ArtifactsRules = exports.ArtifactsObjects = exports.ArtifactsABAP = exports.BuiltIn = exports.MethodLengthStats = exports.LanguageServer = exports.Registry = exports.CyclomaticComplexityStats = exports.ReferenceType = exports.Version = exports.Config = exports.Issue = exports.MemoryFile = void 0;
|
|
4
|
+
exports.RuleTag = void 0;
|
|
4
5
|
const issue_1 = require("./issue");
|
|
5
6
|
Object.defineProperty(exports, "Issue", { enumerable: true, get: function () { return issue_1.Issue; } });
|
|
6
7
|
const config_1 = require("./config");
|
|
@@ -96,4 +97,6 @@ const rules_runner_1 = require("./rules_runner");
|
|
|
96
97
|
Object.defineProperty(exports, "RulesRunner", { enumerable: true, get: function () { return rules_runner_1.RulesRunner; } });
|
|
97
98
|
const _irule_1 = require("./rules/_irule");
|
|
98
99
|
Object.defineProperty(exports, "RuleTag", { enumerable: true, get: function () { return _irule_1.RuleTag; } });
|
|
100
|
+
const cyclomatic_complexity_stats_1 = require("./utils/cyclomatic_complexity_stats");
|
|
101
|
+
Object.defineProperty(exports, "CyclomaticComplexityStats", { enumerable: true, get: function () { return cyclomatic_complexity_stats_1.CyclomaticComplexityStats; } });
|
|
99
102
|
//# sourceMappingURL=index.js.map
|
package/build/src/registry.js
CHANGED
|
@@ -2511,6 +2511,9 @@ ${indentation} output = ${topTarget}.`;
|
|
|
2511
2511
|
if (node.get() instanceof statements_1.ElseIf) {
|
|
2512
2512
|
// assumption: no side effects in IF conditions
|
|
2513
2513
|
insertAt = this.findStartOfIf(node, highFile);
|
|
2514
|
+
if (insertAt === undefined) {
|
|
2515
|
+
continue;
|
|
2516
|
+
}
|
|
2514
2517
|
}
|
|
2515
2518
|
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, insertAt, code);
|
|
2516
2519
|
const start = expression.getFirstToken().getStart();
|
|
@@ -2530,7 +2533,7 @@ ${indentation} output = ${topTarget}.`;
|
|
|
2530
2533
|
return c.getFirstToken().getStart();
|
|
2531
2534
|
}
|
|
2532
2535
|
}
|
|
2533
|
-
return
|
|
2536
|
+
return undefined;
|
|
2534
2537
|
}
|
|
2535
2538
|
newToCreateObject(low, high, lowFile, highSyntax) {
|
|
2536
2539
|
if (!(low.get() instanceof _statement_1.Unknown)) {
|