@abaplint/cli 2.120.1 → 2.120.2
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 +16 -13
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -34057,6 +34057,7 @@ class Source {
|
|
|
34057
34057
|
else {
|
|
34058
34058
|
this.addIfInferred(node, input, foundType);
|
|
34059
34059
|
}
|
|
34060
|
+
this.traverseRemainingChildren(children, input);
|
|
34060
34061
|
return foundType ? foundType : bodyType;
|
|
34061
34062
|
}
|
|
34062
34063
|
case "SWITCH":
|
|
@@ -37127,8 +37128,10 @@ const inline_data_1 = __webpack_require__(/*! ../expressions/inline_data */ "../
|
|
|
37127
37128
|
const dynamic_1 = __webpack_require__(/*! ../expressions/dynamic */ "../core/build/src/abap/5_syntax/expressions/dynamic.js");
|
|
37128
37129
|
class CallTransformation {
|
|
37129
37130
|
runSyntax(node, input) {
|
|
37131
|
+
const resultParameters = node.findExpressionAfterToken("RESULT");
|
|
37132
|
+
const resultSources = new Set((resultParameters === null || resultParameters === void 0 ? void 0 : resultParameters.findAllExpressions(Expressions.SimpleSource3)) || []);
|
|
37130
37133
|
for (const s of node.findAllExpressions(Expressions.SimpleSource3)) {
|
|
37131
|
-
source_1.Source.runSyntax(s, input);
|
|
37134
|
+
source_1.Source.runSyntax(s, input, undefined, resultSources.has(s));
|
|
37132
37135
|
}
|
|
37133
37136
|
for (const d of node.findAllExpressions(Expressions.Dynamic)) {
|
|
37134
37137
|
dynamic_1.Dynamic.runSyntax(d, input);
|
|
@@ -68936,7 +68939,7 @@ class Registry {
|
|
|
68936
68939
|
}
|
|
68937
68940
|
static abaplintVersion() {
|
|
68938
68941
|
// magic, see build script "version.js"
|
|
68939
|
-
return "2.120.
|
|
68942
|
+
return "2.120.2";
|
|
68940
68943
|
}
|
|
68941
68944
|
getDDICReferences() {
|
|
68942
68945
|
return this.ddicReferences;
|
|
@@ -73868,8 +73871,8 @@ ENDCLASS.`,
|
|
|
73868
73871
|
}
|
|
73869
73872
|
}
|
|
73870
73873
|
else if (reference.referenceType === _reference_1.ReferenceType.DataWriteReference) {
|
|
73871
|
-
if (earliestWrite === undefined || pos.isBefore(earliestWrite)) {
|
|
73872
|
-
earliestWrite =
|
|
73874
|
+
if (earliestWrite === undefined || pos.isBefore(earliestWrite.position.getStart())) {
|
|
73875
|
+
earliestWrite = reference;
|
|
73873
73876
|
}
|
|
73874
73877
|
}
|
|
73875
73878
|
}
|
|
@@ -73877,7 +73880,7 @@ ENDCLASS.`,
|
|
|
73877
73880
|
return undefined; // never read, no hazard
|
|
73878
73881
|
}
|
|
73879
73882
|
// the parameter is safe only if it is written in a statement strictly before the first read
|
|
73880
|
-
const readStatement = this.statementStart(firstRead
|
|
73883
|
+
const readStatement = this.statementStart(firstRead, obj);
|
|
73881
73884
|
const writeStatement = earliestWrite === undefined ? undefined : this.statementStart(earliestWrite, obj);
|
|
73882
73885
|
if (writeStatement !== undefined && readStatement !== undefined && writeStatement.isBefore(readStatement)) {
|
|
73883
73886
|
return undefined;
|
|
@@ -73885,14 +73888,14 @@ ENDCLASS.`,
|
|
|
73885
73888
|
const message = `EXPORTING parameter "${parameter.getName().toLowerCase()}" read before it is cleared or assigned`;
|
|
73886
73889
|
return issue_1.Issue.atIdentifier(firstRead.position, message, this.getMetadata().key, this.conf.severity);
|
|
73887
73890
|
}
|
|
73888
|
-
statementStart(
|
|
73889
|
-
|
|
73890
|
-
|
|
73891
|
-
|
|
73892
|
-
|
|
73893
|
-
|
|
73894
|
-
|
|
73895
|
-
|
|
73891
|
+
statementStart(reference, obj) {
|
|
73892
|
+
const file = obj.getABAPFileByName(reference.position.getFilename());
|
|
73893
|
+
for (const statement of (file === null || file === void 0 ? void 0 : file.getStatements()) || []) {
|
|
73894
|
+
const pos = reference.position.getStart();
|
|
73895
|
+
const start = statement.getStart();
|
|
73896
|
+
const end = statement.getEnd();
|
|
73897
|
+
if (pos.equals(start) || (pos.isAfter(start) && pos.isBefore(end))) {
|
|
73898
|
+
return start;
|
|
73896
73899
|
}
|
|
73897
73900
|
}
|
|
73898
73901
|
return undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.120.
|
|
3
|
+
"version": "2.120.2",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"homepage": "https://abaplint.org",
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@abaplint/core": "^2.120.
|
|
42
|
+
"@abaplint/core": "^2.120.2",
|
|
43
43
|
"@types/chai": "^4.3.20",
|
|
44
44
|
"@types/minimist": "^1.2.5",
|
|
45
45
|
"@types/mocha": "^10.0.10",
|