@abaplint/core 2.91.7 → 2.91.10
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/abap/2_statements/statements/get_locale.js +1 -1
- package/build/src/abap/5_syntax/expressions/value_body.js +5 -0
- package/build/src/abap/types/method_parameters.js +3 -0
- package/build/src/registry.js +1 -1
- package/build/src/rules/max_one_statement.js +2 -0
- package/build/src/rules/unknown_types.js +11 -3
- package/package.json +7 -7
|
@@ -8,7 +8,7 @@ class GetLocale {
|
|
|
8
8
|
getMatcher() {
|
|
9
9
|
const country = (0, combi_1.seq)("COUNTRY", expressions_1.Target);
|
|
10
10
|
const modifier = (0, combi_1.seq)("MODIFIER", expressions_1.Target);
|
|
11
|
-
const ret = (0, combi_1.seq)("GET LOCALE LANGUAGE", expressions_1.Target, country,
|
|
11
|
+
const ret = (0, combi_1.seq)("GET LOCALE LANGUAGE", expressions_1.Target, country, modifier);
|
|
12
12
|
return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -27,6 +27,11 @@ class ValueBody {
|
|
|
27
27
|
for (const s of node.findDirectExpressions(Expressions.Source)) {
|
|
28
28
|
type = new source_1.Source().runSyntax(s, scope, filename);
|
|
29
29
|
}
|
|
30
|
+
for (const l of node.findDirectExpressions(Expressions.ValueBodyLines)) {
|
|
31
|
+
for (const s of l.findDirectExpressions(Expressions.Source)) {
|
|
32
|
+
new source_1.Source().runSyntax(s, scope, filename);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
30
35
|
if (scoped === true) {
|
|
31
36
|
scope.pop(node.getLastToken().getEnd());
|
|
32
37
|
}
|
|
@@ -141,6 +141,9 @@ class MethodParameters {
|
|
|
141
141
|
this.add(this.importing, importing, scope, ["importing" /* IdentifierMeta.MethodImporting */]);
|
|
142
142
|
if (importing.concatTokens().toUpperCase().includes(" PREFERRED PARAMETER")) {
|
|
143
143
|
this.preferred = importing.getLastToken().getStr().toUpperCase();
|
|
144
|
+
if (this.preferred.startsWith("!")) {
|
|
145
|
+
this.preferred = this.preferred.substring(1);
|
|
146
|
+
}
|
|
144
147
|
}
|
|
145
148
|
}
|
|
146
149
|
const exporting = node.findFirstExpression(Expressions.MethodDefExporting);
|
package/build/src/registry.js
CHANGED
|
@@ -23,6 +23,8 @@ class MaxOneStatement extends _abap_rule_1.ABAPRule {
|
|
|
23
23
|
shortDescription: `Checks that each line contains only a single statement.`,
|
|
24
24
|
extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
|
|
25
25
|
|
|
26
|
+
Does not report anything for chained statements.
|
|
27
|
+
|
|
26
28
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
|
|
27
29
|
https://docs.abapopenchecks.org/checks/11/`,
|
|
28
30
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
@@ -99,7 +99,7 @@ class UnknownTypes {
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
for (const v of nodeData.idefs) {
|
|
102
|
-
const found = this.
|
|
102
|
+
const found = this.checkParameters(v);
|
|
103
103
|
if (found) {
|
|
104
104
|
const message = "Contains unknown, " + found.found;
|
|
105
105
|
ret.push(issue_1.Issue.atIdentifier(found.id, message, this.getMetadata().key, this.conf.severity));
|
|
@@ -107,7 +107,7 @@ class UnknownTypes {
|
|
|
107
107
|
}
|
|
108
108
|
for (const name in nodeData.cdefs) {
|
|
109
109
|
const v = nodeData.cdefs[name];
|
|
110
|
-
const found = this.
|
|
110
|
+
const found = this.checkParameters(v);
|
|
111
111
|
if (found) {
|
|
112
112
|
const message = "Contains unknown, " + found.found;
|
|
113
113
|
ret.push(issue_1.Issue.atIdentifier(found.id, message, this.getMetadata().key, this.conf.severity));
|
|
@@ -118,7 +118,7 @@ class UnknownTypes {
|
|
|
118
118
|
}
|
|
119
119
|
return ret;
|
|
120
120
|
}
|
|
121
|
-
|
|
121
|
+
checkParameters(idef) {
|
|
122
122
|
var _a;
|
|
123
123
|
for (const m of ((_a = idef.getMethodDefinitions()) === null || _a === void 0 ? void 0 : _a.getAll()) || []) {
|
|
124
124
|
for (const p of m.getParameters().getAll()) {
|
|
@@ -128,6 +128,14 @@ class UnknownTypes {
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
+
for (const e of idef.getEvents() || []) {
|
|
132
|
+
for (const p of e.getParameters()) {
|
|
133
|
+
const found = this.containsUnknown(p.getType());
|
|
134
|
+
if (found) {
|
|
135
|
+
return { id: p, found };
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
131
139
|
return undefined;
|
|
132
140
|
}
|
|
133
141
|
containsUnknown(type) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.91.
|
|
3
|
+
"version": "2.91.10",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -45,21 +45,21 @@
|
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://abaplint.org",
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@microsoft/api-extractor": "^7.28.
|
|
48
|
+
"@microsoft/api-extractor": "^7.28.4",
|
|
49
49
|
"@types/chai": "^4.3.1",
|
|
50
50
|
"@types/mocha": "^9.1.1",
|
|
51
|
-
"@types/node": "^18.0.
|
|
51
|
+
"@types/node": "^18.0.6",
|
|
52
52
|
"chai": "^4.3.6",
|
|
53
|
-
"eslint": "^8.
|
|
53
|
+
"eslint": "^8.20.0",
|
|
54
54
|
"mocha": "^10.0.0",
|
|
55
|
-
"c8": "^7.
|
|
55
|
+
"c8": "^7.12.0",
|
|
56
56
|
"source-map-support": "^0.5.21",
|
|
57
57
|
"ts-json-schema-generator": "^1.0.0",
|
|
58
58
|
"typescript": "^4.7.4"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"fast-xml-parser": "^4.0.
|
|
61
|
+
"fast-xml-parser": "^4.0.9",
|
|
62
62
|
"json5": "^2.2.1",
|
|
63
|
-
"vscode-languageserver-types": "^3.17.
|
|
63
|
+
"vscode-languageserver-types": "^3.17.2"
|
|
64
64
|
}
|
|
65
65
|
}
|