@abaplint/core 2.83.13 → 2.83.14
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/src/registry.js
CHANGED
|
@@ -19,7 +19,7 @@ const _typed_identifier_1 = require("../abap/types/_typed_identifier");
|
|
|
19
19
|
const basic_1 = require("../abap/types/basic");
|
|
20
20
|
const config_1 = require("../config");
|
|
21
21
|
const tokens_1 = require("../abap/1_lexer/tokens");
|
|
22
|
-
// todo: refactor each sub-rule to new classes
|
|
22
|
+
// todo: refactor each sub-rule to new classes?
|
|
23
23
|
class DownportConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
24
24
|
}
|
|
25
25
|
exports.DownportConf = DownportConf;
|
|
@@ -52,6 +52,7 @@ Current rules:
|
|
|
52
52
|
* SELECT INTO @DATA definitions are outlined
|
|
53
53
|
* Some occurrences of string template formatting option ALPHA changed to function module call
|
|
54
54
|
* SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
|
|
55
|
+
* PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
|
|
55
56
|
|
|
56
57
|
Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.`,
|
|
57
58
|
tags: [_irule_1.RuleTag.Experimental, _irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],
|
|
@@ -143,7 +144,11 @@ Only one transformation is applied to a statement at a time, so multiple steps m
|
|
|
143
144
|
if (low.getFirstToken().getStart() instanceof position_1.VirtualPosition) {
|
|
144
145
|
return undefined;
|
|
145
146
|
}
|
|
146
|
-
let found = this.
|
|
147
|
+
let found = this.partiallyImplemented(high, lowFile);
|
|
148
|
+
if (found) {
|
|
149
|
+
return found;
|
|
150
|
+
}
|
|
151
|
+
found = this.emptyKey(high, lowFile);
|
|
147
152
|
if (found) {
|
|
148
153
|
return found;
|
|
149
154
|
}
|
|
@@ -428,6 +433,21 @@ ${indentation}`);
|
|
|
428
433
|
const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
|
|
429
434
|
return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
|
|
430
435
|
}
|
|
436
|
+
partiallyImplemented(node, lowFile) {
|
|
437
|
+
if (node.get() instanceof Statements.InterfaceDef) {
|
|
438
|
+
const partially = node.findDirectTokenByText("PARTIALLY");
|
|
439
|
+
if (partially === undefined) {
|
|
440
|
+
return undefined;
|
|
441
|
+
}
|
|
442
|
+
const implemented = node.findDirectTokenByText("IMPLEMENTED");
|
|
443
|
+
if (implemented === undefined) {
|
|
444
|
+
return undefined;
|
|
445
|
+
}
|
|
446
|
+
const fix = edit_helper_1.EditHelper.deleteRange(lowFile, partially.getStart(), implemented.getEnd());
|
|
447
|
+
return issue_1.Issue.atToken(lowFile, partially, "Downport PARTIALLY IMPLEMENTED", this.getMetadata().key, this.conf.severity, fix);
|
|
448
|
+
}
|
|
449
|
+
return undefined;
|
|
450
|
+
}
|
|
431
451
|
emptyKey(node, lowFile) {
|
|
432
452
|
for (let i of node.findAllExpressions(Expressions.TypeTable)) {
|
|
433
453
|
const key = i.findDirectExpression(Expressions.TypeTableKey);
|
|
@@ -58,7 +58,7 @@ class UnnecessaryChaining extends _abap_rule_1.ABAPRule {
|
|
|
58
58
|
}
|
|
59
59
|
const fix = edit_helper_1.EditHelper.deleteRange(file, colon.getStart(), colon.getEnd());
|
|
60
60
|
const message = "Unnecessary chaining";
|
|
61
|
-
const issue = issue_1.Issue.
|
|
61
|
+
const issue = issue_1.Issue.atToken(file, colon, message, this.getMetadata().key, this.conf.severity, fix);
|
|
62
62
|
issues.push(issue);
|
|
63
63
|
}
|
|
64
64
|
return issues;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.83.
|
|
3
|
+
"version": "2.83.14",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"chai": "^4.3.4",
|
|
53
53
|
"eslint": "^8.5.0",
|
|
54
54
|
"mocha": "^9.1.3",
|
|
55
|
-
"c8": "^7.
|
|
55
|
+
"c8": "^7.11.0",
|
|
56
56
|
"source-map-support": "^0.5.21",
|
|
57
57
|
"ts-json-schema-generator": "^0.97.0",
|
|
58
58
|
"typescript": "^4.5.4"
|