@abaplint/cli 2.107.2 → 2.107.4
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/cli.js +30 -31
- package/package.json +4 -4
package/build/cli.js
CHANGED
|
@@ -245,7 +245,7 @@ class ApplyFixes {
|
|
|
245
245
|
const edits = [];
|
|
246
246
|
const appliedIssues = [];
|
|
247
247
|
for (const i of issues) {
|
|
248
|
-
const edit = i.
|
|
248
|
+
const edit = i.getDefaultFix();
|
|
249
249
|
if (edit === undefined) {
|
|
250
250
|
continue;
|
|
251
251
|
}
|
|
@@ -41254,8 +41254,8 @@ exports.MemoryFile = MemoryFile;
|
|
|
41254
41254
|
"use strict";
|
|
41255
41255
|
|
|
41256
41256
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
41257
|
-
exports.
|
|
41258
|
-
exports.RuleTag = exports.Severity = void 0;
|
|
41257
|
+
exports.Info = exports.Diagnostics = 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.SkipLogic = 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;
|
|
41258
|
+
exports.LSPEdit = exports.RuleTag = exports.Severity = exports.Visibility = void 0;
|
|
41259
41259
|
const issue_1 = __webpack_require__(/*! ./issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
41260
41260
|
Object.defineProperty(exports, "Issue", ({ enumerable: true, get: function () { return issue_1.Issue; } }));
|
|
41261
41261
|
const config_1 = __webpack_require__(/*! ./config */ "./node_modules/@abaplint/core/build/src/config.js");
|
|
@@ -41356,6 +41356,10 @@ const cyclomatic_complexity_stats_1 = __webpack_require__(/*! ./utils/cyclomatic
|
|
|
41356
41356
|
Object.defineProperty(exports, "CyclomaticComplexityStats", ({ enumerable: true, get: function () { return cyclomatic_complexity_stats_1.CyclomaticComplexityStats; } }));
|
|
41357
41357
|
const skip_logic_1 = __webpack_require__(/*! ./skip_logic */ "./node_modules/@abaplint/core/build/src/skip_logic.js");
|
|
41358
41358
|
Object.defineProperty(exports, "SkipLogic", ({ enumerable: true, get: function () { return skip_logic_1.SkipLogic; } }));
|
|
41359
|
+
const diagnostics_1 = __webpack_require__(/*! ./lsp/diagnostics */ "./node_modules/@abaplint/core/build/src/lsp/diagnostics.js");
|
|
41360
|
+
Object.defineProperty(exports, "Diagnostics", ({ enumerable: true, get: function () { return diagnostics_1.Diagnostics; } }));
|
|
41361
|
+
const _edit_1 = __webpack_require__(/*! ./lsp/_edit */ "./node_modules/@abaplint/core/build/src/lsp/_edit.js");
|
|
41362
|
+
Object.defineProperty(exports, "LSPEdit", ({ enumerable: true, get: function () { return _edit_1.LSPEdit; } }));
|
|
41359
41363
|
//# sourceMappingURL=index.js.map
|
|
41360
41364
|
|
|
41361
41365
|
/***/ }),
|
|
@@ -41401,7 +41405,7 @@ class Issue {
|
|
|
41401
41405
|
key,
|
|
41402
41406
|
start,
|
|
41403
41407
|
end,
|
|
41404
|
-
fix,
|
|
41408
|
+
defaultFix: fix,
|
|
41405
41409
|
severity,
|
|
41406
41410
|
});
|
|
41407
41411
|
}
|
|
@@ -41415,7 +41419,7 @@ class Issue {
|
|
|
41415
41419
|
key,
|
|
41416
41420
|
start,
|
|
41417
41421
|
end,
|
|
41418
|
-
fix,
|
|
41422
|
+
defaultFix: fix,
|
|
41419
41423
|
severity,
|
|
41420
41424
|
});
|
|
41421
41425
|
}
|
|
@@ -41427,7 +41431,7 @@ class Issue {
|
|
|
41427
41431
|
key,
|
|
41428
41432
|
start,
|
|
41429
41433
|
end,
|
|
41430
|
-
fix,
|
|
41434
|
+
defaultFix: fix,
|
|
41431
41435
|
severity,
|
|
41432
41436
|
});
|
|
41433
41437
|
}
|
|
@@ -41440,7 +41444,7 @@ class Issue {
|
|
|
41440
41444
|
start: token.getStart(),
|
|
41441
41445
|
end: token.getEnd(),
|
|
41442
41446
|
severity,
|
|
41443
|
-
fix,
|
|
41447
|
+
defaultFix: fix,
|
|
41444
41448
|
});
|
|
41445
41449
|
}
|
|
41446
41450
|
static atIdentifier(identifier, message, key, severity, fix) {
|
|
@@ -41452,14 +41456,14 @@ class Issue {
|
|
|
41452
41456
|
start: identifier.getStart(),
|
|
41453
41457
|
end: identifier.getEnd(),
|
|
41454
41458
|
severity,
|
|
41455
|
-
fix,
|
|
41459
|
+
defaultFix: fix,
|
|
41456
41460
|
});
|
|
41457
41461
|
}
|
|
41458
41462
|
constructor(data) {
|
|
41459
41463
|
this.data = data;
|
|
41460
41464
|
if (this.data.start instanceof virtual_position_1.VirtualPosition) {
|
|
41461
41465
|
// no quick fixes inside macros
|
|
41462
|
-
this.data.
|
|
41466
|
+
this.data.defaultFix = undefined;
|
|
41463
41467
|
}
|
|
41464
41468
|
if (this.data.start.getCol() < 1) {
|
|
41465
41469
|
throw new Error("issue, start col < 1");
|
|
@@ -41486,8 +41490,11 @@ class Issue {
|
|
|
41486
41490
|
getFilename() {
|
|
41487
41491
|
return this.data.filename;
|
|
41488
41492
|
}
|
|
41489
|
-
|
|
41490
|
-
return this.data.
|
|
41493
|
+
getDefaultFix() {
|
|
41494
|
+
return this.data.defaultFix;
|
|
41495
|
+
}
|
|
41496
|
+
getAlternativeFixes() {
|
|
41497
|
+
return this.data.alternativeFixes;
|
|
41491
41498
|
}
|
|
41492
41499
|
getSeverity() {
|
|
41493
41500
|
return this.data.severity;
|
|
@@ -41522,22 +41529,6 @@ class LSPEdit {
|
|
|
41522
41529
|
}
|
|
41523
41530
|
return workspace;
|
|
41524
41531
|
}
|
|
41525
|
-
/*
|
|
41526
|
-
public static mapEditsDocument(edit: IEdit): LServer.WorkspaceEdit {
|
|
41527
|
-
const workspace: LServer.WorkspaceEdit = {documentChanges: []};
|
|
41528
|
-
for (const filename in edit) {
|
|
41529
|
-
const doc: LServer.VersionedTextDocumentIdentifier = {uri: filename, version: 1};
|
|
41530
|
-
|
|
41531
|
-
const e = LServer.TextDocumentEdit.create(doc, this.mapText(edit[filename]));
|
|
41532
|
-
workspace.documentChanges?.push(e);
|
|
41533
|
-
}
|
|
41534
|
-
// @ts-ignore
|
|
41535
|
-
console.dir(workspace.documentChanges![0].edits[0]);
|
|
41536
|
-
// @ts-ignore
|
|
41537
|
-
console.dir(workspace.documentChanges![0].edits[1]);
|
|
41538
|
-
return workspace;
|
|
41539
|
-
}
|
|
41540
|
-
*/
|
|
41541
41532
|
static mapEdit(edit) {
|
|
41542
41533
|
const workspace = { changes: {} };
|
|
41543
41534
|
for (const filename in edit) {
|
|
@@ -42040,7 +42031,7 @@ class CodeActions {
|
|
|
42040
42031
|
const shown = new Set();
|
|
42041
42032
|
const ret = [];
|
|
42042
42033
|
for (const i of issues) {
|
|
42043
|
-
const fix = i.
|
|
42034
|
+
const fix = i.getDefaultFix();
|
|
42044
42035
|
if (fix === undefined) {
|
|
42045
42036
|
continue;
|
|
42046
42037
|
}
|
|
@@ -42075,7 +42066,7 @@ class CodeActions {
|
|
|
42075
42066
|
const diagnostics = [];
|
|
42076
42067
|
const fixes = [];
|
|
42077
42068
|
for (const i of issues) {
|
|
42078
|
-
const fix = i.
|
|
42069
|
+
const fix = i.getDefaultFix();
|
|
42079
42070
|
if (fix === undefined) {
|
|
42080
42071
|
continue;
|
|
42081
42072
|
}
|
|
@@ -51462,7 +51453,7 @@ class Registry {
|
|
|
51462
51453
|
}
|
|
51463
51454
|
static abaplintVersion() {
|
|
51464
51455
|
// magic, see build script "version.sh"
|
|
51465
|
-
return "2.107.
|
|
51456
|
+
return "2.107.4";
|
|
51466
51457
|
}
|
|
51467
51458
|
getDDICReferences() {
|
|
51468
51459
|
return this.ddicReferences;
|
|
@@ -52583,6 +52574,14 @@ ENDINTERFACE.`,
|
|
|
52583
52574
|
}
|
|
52584
52575
|
check(fields, column, file) {
|
|
52585
52576
|
const issues = [];
|
|
52577
|
+
const rows = new Set();
|
|
52578
|
+
for (const f of fields) {
|
|
52579
|
+
const row = f.after.getRow();
|
|
52580
|
+
if (rows.has(row)) {
|
|
52581
|
+
return [];
|
|
52582
|
+
}
|
|
52583
|
+
rows.add(row);
|
|
52584
|
+
}
|
|
52586
52585
|
for (const f of fields) {
|
|
52587
52586
|
if (f.after.getCol() === column) {
|
|
52588
52587
|
continue;
|
|
@@ -53671,7 +53670,7 @@ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statement
|
|
|
53671
53670
|
}
|
|
53672
53671
|
let prevFix;
|
|
53673
53672
|
if (previousRow === colon.getStart().getRow()) {
|
|
53674
|
-
prevFix = (_a = issues.pop()) === null || _a === void 0 ? void 0 : _a.
|
|
53673
|
+
prevFix = (_a = issues.pop()) === null || _a === void 0 ? void 0 : _a.getDefaultFix();
|
|
53675
53674
|
}
|
|
53676
53675
|
const fix = this.getFix(file, statement, statementNode, prevFix);
|
|
53677
53676
|
const message = "Chain mainly declarations";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.107.
|
|
3
|
+
"version": "2.107.4",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://abaplint.org",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@abaplint/core": "^2.107.
|
|
42
|
-
"@types/chai": "^4.3.
|
|
41
|
+
"@abaplint/core": "^2.107.4",
|
|
42
|
+
"@types/chai": "^4.3.16",
|
|
43
43
|
"@types/glob": "^8.1.0",
|
|
44
44
|
"@types/minimist": "^1.2.5",
|
|
45
45
|
"@types/mocha": "^10.0.6",
|
|
46
|
-
"@types/node": "^20.12.
|
|
46
|
+
"@types/node": "^20.12.9",
|
|
47
47
|
"@types/progress": "^2.0.7",
|
|
48
48
|
"chai": "^4.4.1",
|
|
49
49
|
"chalk": "^5.3.0",
|