@abaplint/cli 2.115.3 → 2.115.5
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 +55 -14
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -11974,7 +11974,7 @@ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/co
|
|
|
11974
11974
|
const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
11975
11975
|
class DataBegin {
|
|
11976
11976
|
getMatcher() {
|
|
11977
|
-
const occurs = (0, combi_1.seq)("OCCURS", expressions_1.Integer);
|
|
11977
|
+
const occurs = (0, combi_1.seq)("OCCURS", (0, combi_1.altPrio)(expressions_1.Integer, expressions_1.FieldChain));
|
|
11978
11978
|
const common = (0, combi_1.seq)("COMMON PART", (0, combi_1.optPrio)(expressions_1.DefinitionName));
|
|
11979
11979
|
const structure = (0, combi_1.seq)("BEGIN OF", (0, combi_1.altPrio)(common, (0, combi_1.seq)(expressions_1.DefinitionName, (0, combi_1.optPrio)("READ-ONLY"), (0, combi_1.optPrio)(occurs))));
|
|
11980
11980
|
return (0, combi_1.seq)("DATA", structure);
|
|
@@ -18678,7 +18678,8 @@ class Write {
|
|
|
18678
18678
|
const as = (0, combi_1.seq)("AS", (0, combi_1.altPrio)("LINE", "ICON", "CHECKBOX", "SYMBOL"));
|
|
18679
18679
|
const to = (0, combi_1.seq)("TO", expressions_1.Target);
|
|
18680
18680
|
const options = (0, combi_1.per)(mask, to, (0, combi_1.seq)("EXPONENT", expressions_1.Source), "NO-GROUPING", "NO-ZERO", "CENTERED", (0, combi_1.seq)("INPUT", (0, combi_1.opt)(onOff)), "NO-GAP", "LEFT-JUSTIFIED", as, (0, combi_1.seq)("FRAMES", onOff), (0, combi_1.seq)("HOTSPOT", (0, combi_1.opt)(onOff)), "RIGHT-JUSTIFIED", (0, combi_1.seq)("TIME ZONE", expressions_1.Source), (0, combi_1.seq)("UNDER", expressions_1.Source), (0, combi_1.seq)("STYLE", expressions_1.Source), (0, combi_1.seq)("ROUND", expressions_1.Source), (0, combi_1.seq)("QUICKINFO", expressions_1.Source), "ENVIRONMENT TIME FORMAT", dateFormat, (0, combi_1.seq)("UNIT", expressions_1.Source), (0, combi_1.seq)("INTENSIFIED", (0, combi_1.opt)(onOff)), (0, combi_1.seq)("INDEX", expressions_1.Source), (0, combi_1.seq)("DECIMALS", expressions_1.Source), (0, combi_1.seq)("INVERSE", (0, combi_1.opt)(onOff)), expressions_1.Color, (0, combi_1.seq)("CURRENCY", expressions_1.Source), "RESET", "NO-SIGN");
|
|
18681
|
-
|
|
18681
|
+
// Need to refactor all this sometime,
|
|
18682
|
+
const ret = (0, combi_1.seq)("WRITE", (0, combi_1.alt)((0, combi_1.seq)("AT /", (0, combi_1.opt)(expressions_1.Source), (0, combi_1.opt)("NO-GAP")), (0, combi_1.seq)((0, combi_1.opt)(expressions_1.WriteOffsetLength), (0, combi_1.alt)(expressions_1.Source, expressions_1.Dynamic, "/"), (0, combi_1.opt)(options))));
|
|
18682
18683
|
return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
|
|
18683
18684
|
}
|
|
18684
18685
|
}
|
|
@@ -42633,8 +42634,22 @@ class DDIC {
|
|
|
42633
42634
|
case "XSTRING":
|
|
42634
42635
|
return Types.XStringType.get({ qualifiedName: qualifiedName || name });
|
|
42635
42636
|
case "D":
|
|
42637
|
+
/*
|
|
42638
|
+
if (length && length > 0) {
|
|
42639
|
+
throw new Error("Length for type D not possible");
|
|
42640
|
+
} else if (decimals && decimals > 0) {
|
|
42641
|
+
throw new Error("Decimals for type D not possible");
|
|
42642
|
+
}
|
|
42643
|
+
*/
|
|
42636
42644
|
return new Types.DateType({ qualifiedName: qualifiedName || name });
|
|
42637
42645
|
case "T":
|
|
42646
|
+
/*
|
|
42647
|
+
if (length && length > 0) {
|
|
42648
|
+
throw new Error("Length for type T not possible");
|
|
42649
|
+
} else if (decimals && decimals > 0) {
|
|
42650
|
+
throw new Error("Decimals for type T not possible");
|
|
42651
|
+
}
|
|
42652
|
+
*/
|
|
42638
42653
|
return new Types.TimeType({ qualifiedName: qualifiedName || name });
|
|
42639
42654
|
case "XSEQUENCE":
|
|
42640
42655
|
return new Types.XSequenceType({ qualifiedName: qualifiedName });
|
|
@@ -42667,6 +42682,13 @@ class DDIC {
|
|
|
42667
42682
|
case "INT8": // todo, take version into account
|
|
42668
42683
|
return new Types.Integer8Type({ qualifiedName: qualifiedName || name });
|
|
42669
42684
|
case "F":
|
|
42685
|
+
/*
|
|
42686
|
+
if (length && length > 0) {
|
|
42687
|
+
throw new Error("Length for type F not possible");
|
|
42688
|
+
} else if (decimals && decimals > 0) {
|
|
42689
|
+
throw new Error("Decimals for type F not possible");
|
|
42690
|
+
}
|
|
42691
|
+
*/
|
|
42670
42692
|
return new Types.FloatType({ qualifiedName: qualifiedName || name });
|
|
42671
42693
|
case "P":
|
|
42672
42694
|
if (length && decimals) {
|
|
@@ -55215,7 +55237,7 @@ class Registry {
|
|
|
55215
55237
|
}
|
|
55216
55238
|
static abaplintVersion() {
|
|
55217
55239
|
// magic, see build script "version.sh"
|
|
55218
|
-
return "2.115.
|
|
55240
|
+
return "2.115.5";
|
|
55219
55241
|
}
|
|
55220
55242
|
getDDICReferences() {
|
|
55221
55243
|
return this.ddicReferences;
|
|
@@ -60233,7 +60255,14 @@ class DoubleSpace extends _abap_rule_1.ABAPRule {
|
|
|
60233
60255
|
issues = issues.concat(this.checkParen(s, file));
|
|
60234
60256
|
}
|
|
60235
60257
|
issues = issues.concat(this.checkAfterColon(file));
|
|
60236
|
-
|
|
60258
|
+
// remove issues with the same starting position
|
|
60259
|
+
const uniqueIssues = [];
|
|
60260
|
+
for (const issue of issues) {
|
|
60261
|
+
if (uniqueIssues.findIndex(i => i.getStart().equals(issue.getStart())) === -1) {
|
|
60262
|
+
uniqueIssues.push(issue);
|
|
60263
|
+
}
|
|
60264
|
+
}
|
|
60265
|
+
return uniqueIssues;
|
|
60237
60266
|
}
|
|
60238
60267
|
checkAfterColon(file) {
|
|
60239
60268
|
const issues = [];
|
|
@@ -68448,7 +68477,7 @@ ENDIF.
|
|
|
68448
68477
|
return [];
|
|
68449
68478
|
}
|
|
68450
68479
|
for (const cond of structure.findAllExpressionsMulti([Expressions.Cond, Expressions.ComponentCond])) {
|
|
68451
|
-
issues.push(...this.
|
|
68480
|
+
issues.push(...this.analyzeCondition(file, cond));
|
|
68452
68481
|
}
|
|
68453
68482
|
for (const sub of structure.findAllExpressionsMulti([Expressions.CondSub, Expressions.ComponentCondSub])) {
|
|
68454
68483
|
let cond = [];
|
|
@@ -68502,18 +68531,20 @@ ENDIF.
|
|
|
68502
68531
|
}
|
|
68503
68532
|
analyzeMove(file, m) {
|
|
68504
68533
|
const issues = [];
|
|
68505
|
-
const
|
|
68506
|
-
|
|
68507
|
-
|
|
68508
|
-
|
|
68509
|
-
|
|
68510
|
-
|
|
68511
|
-
|
|
68512
|
-
|
|
68534
|
+
for (const source of m.findAllExpressionsRecursive(Expressions.Source)) {
|
|
68535
|
+
const lastChildren = source.getChildren();
|
|
68536
|
+
if (lastChildren.length === 3
|
|
68537
|
+
&& lastChildren[0].getFirstToken().getStr() === "("
|
|
68538
|
+
&& lastChildren[1].getChildren().length === 1
|
|
68539
|
+
&& lastChildren[1].getFirstToken().getStr().startsWith("-") === false
|
|
68540
|
+
&& lastChildren[2].getFirstToken().getStr() === ")") {
|
|
68541
|
+
const issue = issue_1.Issue.atToken(file, lastChildren[0].getFirstToken(), "Too many parentheses", this.getMetadata().key, this.conf.severity);
|
|
68542
|
+
issues.push(issue);
|
|
68543
|
+
}
|
|
68513
68544
|
}
|
|
68514
68545
|
return issues;
|
|
68515
68546
|
}
|
|
68516
|
-
|
|
68547
|
+
analyzeCondition(file, cond) {
|
|
68517
68548
|
var _a, _b;
|
|
68518
68549
|
const issues = [];
|
|
68519
68550
|
let comparator = "";
|
|
@@ -70970,6 +71001,8 @@ class ObsoleteStatementConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
|
70970
71001
|
this.fieldGroups = true;
|
|
70971
71002
|
/** Check for REPLACE INTO */
|
|
70972
71003
|
this.replaceInto = true;
|
|
71004
|
+
this.loopExtract = true;
|
|
71005
|
+
this.sortExtract = true;
|
|
70973
71006
|
}
|
|
70974
71007
|
}
|
|
70975
71008
|
exports.ObsoleteStatementConf = ObsoleteStatementConf;
|
|
@@ -71223,6 +71256,14 @@ ENDIF.`,
|
|
|
71223
71256
|
issues.push(issue);
|
|
71224
71257
|
}
|
|
71225
71258
|
}
|
|
71259
|
+
if (this.conf.loopExtract && sta instanceof Statements.LoopExtract) {
|
|
71260
|
+
const issue = issue_1.Issue.atStatement(file, staNode, "LOOP extract", this.getMetadata().key, this.conf.severity);
|
|
71261
|
+
issues.push(issue);
|
|
71262
|
+
}
|
|
71263
|
+
if (this.conf.sortExtract && sta instanceof Statements.SortDataset && staNode.getChildren().length === 2) {
|
|
71264
|
+
const issue = issue_1.Issue.atStatement(file, staNode, "SORT extract", this.getMetadata().key, this.conf.severity);
|
|
71265
|
+
issues.push(issue);
|
|
71266
|
+
}
|
|
71226
71267
|
if (configVersion >= version_1.Version.v754 && this.conf.clientSpecified
|
|
71227
71268
|
&& (sta instanceof Statements.Select
|
|
71228
71269
|
|| sta instanceof Statements.SelectLoop
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.115.
|
|
3
|
+
"version": "2.115.5",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://abaplint.org",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@abaplint/core": "^2.115.
|
|
41
|
+
"@abaplint/core": "^2.115.5",
|
|
42
42
|
"@types/chai": "^4.3.20",
|
|
43
43
|
"@types/minimist": "^1.2.5",
|
|
44
44
|
"@types/mocha": "^10.0.10",
|