@abaplint/cli 2.99.5 → 2.99.7
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 +41 -5
- package/package.json +4 -4
package/build/cli.js
CHANGED
|
@@ -22571,7 +22571,23 @@ class BasicTypes {
|
|
|
22571
22571
|
}
|
|
22572
22572
|
const constant = val.findFirstExpression(Expressions.Constant);
|
|
22573
22573
|
if (constant) {
|
|
22574
|
-
|
|
22574
|
+
const conc = val.findFirstExpression(Expressions.ConcatenatedConstant);
|
|
22575
|
+
if (conc) {
|
|
22576
|
+
const first = conc.getFirstToken().getStr().substring(0, 1);
|
|
22577
|
+
let result = "";
|
|
22578
|
+
for (const token of conc.getAllTokens()) {
|
|
22579
|
+
if (token.getStr() === "&") {
|
|
22580
|
+
continue;
|
|
22581
|
+
}
|
|
22582
|
+
else {
|
|
22583
|
+
result += token.getStr().substring(1, token.getStr().length - 1);
|
|
22584
|
+
}
|
|
22585
|
+
}
|
|
22586
|
+
return first + result + first;
|
|
22587
|
+
}
|
|
22588
|
+
else {
|
|
22589
|
+
return constant.concatTokens();
|
|
22590
|
+
}
|
|
22575
22591
|
}
|
|
22576
22592
|
const chain = val.findFirstExpression(Expressions.SimpleFieldChain);
|
|
22577
22593
|
if (chain) {
|
|
@@ -37739,9 +37755,10 @@ class Config {
|
|
|
37739
37755
|
return new Config(JSON.stringify(config));
|
|
37740
37756
|
}
|
|
37741
37757
|
getEnabledRules() {
|
|
37758
|
+
var _a;
|
|
37742
37759
|
const rules = [];
|
|
37743
37760
|
for (const rule of artifacts_rules_1.ArtifactsRules.getRules()) {
|
|
37744
|
-
const ruleConfig = this.config["rules"][rule.getMetadata().key];
|
|
37761
|
+
const ruleConfig = (_a = this.config["rules"]) === null || _a === void 0 ? void 0 : _a[rule.getMetadata().key];
|
|
37745
37762
|
const ruleExists = ruleConfig !== undefined;
|
|
37746
37763
|
if (ruleExists) {
|
|
37747
37764
|
if (ruleConfig === false) { // "rule": false
|
|
@@ -45096,6 +45113,7 @@ class RenameDataElement {
|
|
|
45096
45113
|
changes = changes.concat(helper.renameDDICCodeReferences(obj, oldName, newName));
|
|
45097
45114
|
changes = changes.concat(helper.renameDDICTABLReferences(obj, oldName, newName));
|
|
45098
45115
|
changes = changes.concat(helper.renameDDICTTYPReferences(obj, oldName, newName));
|
|
45116
|
+
changes = changes.concat(helper.renameDDICAUTHReferences(obj, oldName, newName));
|
|
45099
45117
|
return {
|
|
45100
45118
|
documentChanges: changes,
|
|
45101
45119
|
};
|
|
@@ -45565,6 +45583,21 @@ class RenamerHelper {
|
|
|
45565
45583
|
}
|
|
45566
45584
|
return changes;
|
|
45567
45585
|
}
|
|
45586
|
+
renameDDICAUTHReferences(obj, oldName, newName) {
|
|
45587
|
+
const changes = [];
|
|
45588
|
+
const used = this.reg.getDDICReferences().listWhereUsed(obj);
|
|
45589
|
+
for (const u of used) {
|
|
45590
|
+
if (u.type !== "AUTH") {
|
|
45591
|
+
continue;
|
|
45592
|
+
}
|
|
45593
|
+
const tabl = this.reg.getObject(u.type, u.name);
|
|
45594
|
+
if (tabl === undefined) {
|
|
45595
|
+
continue;
|
|
45596
|
+
}
|
|
45597
|
+
changes.push(...this.buildXMLFileEdits(tabl, "ROLLNAME", oldName, newName));
|
|
45598
|
+
}
|
|
45599
|
+
return changes;
|
|
45600
|
+
}
|
|
45568
45601
|
buildXMLFileEdits(object, xmlTag, oldName, newName) {
|
|
45569
45602
|
const changes = [];
|
|
45570
45603
|
const xml = object.getXMLFile();
|
|
@@ -47558,7 +47591,7 @@ class Registry {
|
|
|
47558
47591
|
}
|
|
47559
47592
|
static abaplintVersion() {
|
|
47560
47593
|
// magic, see build script "version.sh"
|
|
47561
|
-
return "2.99.
|
|
47594
|
+
return "2.99.7";
|
|
47562
47595
|
}
|
|
47563
47596
|
getDDICReferences() {
|
|
47564
47597
|
return this.references;
|
|
@@ -49847,10 +49880,12 @@ class CheckComments extends _abap_rule_1.ABAPRule {
|
|
|
49847
49880
|
shortDescription: `
|
|
49848
49881
|
Various checks for comment usage.`,
|
|
49849
49882
|
extendedInformation: `
|
|
49850
|
-
|
|
49883
|
+
Detects end of line comments. Comments starting with "#EC" or "##" are ignored
|
|
49851
49884
|
|
|
49852
49885
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
|
|
49853
49886
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
49887
|
+
badExample: `WRITE 2. " descriptive comment`,
|
|
49888
|
+
goodExample: `" descriptive comment\nWRITE 2.`,
|
|
49854
49889
|
};
|
|
49855
49890
|
}
|
|
49856
49891
|
getDescription(issueType) {
|
|
@@ -64881,7 +64916,7 @@ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mo
|
|
|
64881
64916
|
Also see separate rule sql_escape_host_variables
|
|
64882
64917
|
|
|
64883
64918
|
Activates from v750 and up`,
|
|
64884
|
-
tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.
|
|
64919
|
+
tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix],
|
|
64885
64920
|
};
|
|
64886
64921
|
}
|
|
64887
64922
|
getConfig() {
|
|
@@ -66064,6 +66099,7 @@ ENDIF.`,
|
|
|
66064
66099
|
&& !(statement.get() instanceof Statements.DataEnd)
|
|
66065
66100
|
&& !(statement.get() instanceof Statements.Type)
|
|
66066
66101
|
&& !(statement.get() instanceof Statements.Form)
|
|
66102
|
+
&& !(statement.get() instanceof Statements.Tables)
|
|
66067
66103
|
&& !(statement.get() instanceof Statements.TypeEnd)
|
|
66068
66104
|
&& !(statement.get() instanceof Statements.Constant)
|
|
66069
66105
|
&& !(statement.get() instanceof Statements.ConstantEnd)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.99.
|
|
3
|
+
"version": "2.99.7",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"bin": {
|
|
6
6
|
"abaplint": "./abaplint"
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
},
|
|
38
38
|
"homepage": "https://abaplint.org",
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@abaplint/core": "^2.99.
|
|
40
|
+
"@abaplint/core": "^2.99.7",
|
|
41
41
|
"@types/chai": "^4.3.5",
|
|
42
42
|
"@types/glob": "^7.2.0",
|
|
43
43
|
"@types/minimist": "^1.2.2",
|
|
44
44
|
"@types/mocha": "^10.0.1",
|
|
45
|
-
"@types/node": "^
|
|
45
|
+
"@types/node": "^20.1.0",
|
|
46
46
|
"@types/progress": "^2.0.5",
|
|
47
47
|
"chai": "^4.3.7",
|
|
48
48
|
"chalk": "^5.2.0",
|
|
49
|
-
"eslint": "^8.
|
|
49
|
+
"eslint": "^8.40.0",
|
|
50
50
|
"glob": "^7.2.3",
|
|
51
51
|
"json5": "^2.2.3",
|
|
52
52
|
"memfs": "^3.5.1",
|