@abaplint/core 2.94.16 → 2.94.18
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.
|
@@ -14,6 +14,7 @@ const dynamic_1 = require("../expressions/dynamic");
|
|
|
14
14
|
const loop_group_by_1 = require("../expressions/loop_group_by");
|
|
15
15
|
class Loop {
|
|
16
16
|
runSyntax(node, scope, filename) {
|
|
17
|
+
var _a;
|
|
17
18
|
const loopTarget = node.findDirectExpression(Expressions.LoopTarget);
|
|
18
19
|
let target = loopTarget === null || loopTarget === void 0 ? void 0 : loopTarget.findDirectExpression(Expressions.Target);
|
|
19
20
|
const targetType = target ? new target_1.Target().runSyntax(target, scope, filename) : undefined;
|
|
@@ -46,8 +47,9 @@ class Loop {
|
|
|
46
47
|
throw new Error("Loop, not a table type");
|
|
47
48
|
}
|
|
48
49
|
if (sourceType instanceof basic_1.TableType) {
|
|
50
|
+
const targetConcat = (_a = node.findDirectExpression(Expressions.LoopTarget)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
|
|
49
51
|
sourceType = sourceType.getRowType();
|
|
50
|
-
if (
|
|
52
|
+
if (targetConcat === null || targetConcat === void 0 ? void 0 : targetConcat.startsWith("REFERENCE INTO ")) {
|
|
51
53
|
sourceType = new basic_1.DataReference(sourceType);
|
|
52
54
|
}
|
|
53
55
|
}
|
package/build/src/registry.js
CHANGED
|
@@ -29,7 +29,7 @@ class DefinitionsTop extends _abap_rule_1.ABAPRule {
|
|
|
29
29
|
return {
|
|
30
30
|
key: "definitions_top",
|
|
31
31
|
title: "Place definitions in top of routine",
|
|
32
|
-
shortDescription: `Checks that definitions are placed at the beginning of METHODs and
|
|
32
|
+
shortDescription: `Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.`,
|
|
33
33
|
extendedInformation: `If the routine has inline definitions then no issues are reported
|
|
34
34
|
|
|
35
35
|
https://docs.abapopenchecks.org/checks/17/`,
|
|
@@ -56,7 +56,7 @@ https://docs.abapopenchecks.org/checks/17/`,
|
|
|
56
56
|
if (containsUnknown === true) {
|
|
57
57
|
return [];
|
|
58
58
|
}
|
|
59
|
-
const routines = structure.findAllStructuresMulti([Structures.Form, Structures.Method]);
|
|
59
|
+
const routines = structure.findAllStructuresMulti([Structures.Form, Structures.Method, Structures.FunctionModule]);
|
|
60
60
|
for (const r of routines) {
|
|
61
61
|
// one fix per routine
|
|
62
62
|
this.fixed = false;
|
|
@@ -83,6 +83,9 @@ https://docs.abapopenchecks.org/checks/17/`,
|
|
|
83
83
|
if (get instanceof _statement_1.Comment) {
|
|
84
84
|
continue;
|
|
85
85
|
}
|
|
86
|
+
else if (get instanceof Statements.FunctionModule) {
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
86
89
|
else if (get instanceof Statements.Form) {
|
|
87
90
|
continue;
|
|
88
91
|
}
|
|
@@ -35,7 +35,7 @@ class PreferCorresponding extends _abap_rule_1.ABAPRule {
|
|
|
35
35
|
if (this.reg.getConfig().getVersion() < version_1.Version.v740sp05) {
|
|
36
36
|
return issues;
|
|
37
37
|
}
|
|
38
|
-
const message = "Use CORRESPONDING type( ... ) instead";
|
|
38
|
+
const message = "Use CORRESPONDING type( ... ) instead of MOVE-CORRESPONDING";
|
|
39
39
|
for (const stat of file.getStatements()) {
|
|
40
40
|
if (stat.get() instanceof Statements.MoveCorresponding
|
|
41
41
|
&& stat.getChildren().length === 7) {
|