@abaplint/cli 2.119.38 → 2.119.40
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 +44 -12
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -37415,6 +37415,7 @@ const source_1 = __webpack_require__(/*! ../expressions/source */ "../core/build
|
|
|
37415
37415
|
const component_compare_1 = __webpack_require__(/*! ../expressions/component_compare */ "../core/build/src/abap/5_syntax/expressions/component_compare.js");
|
|
37416
37416
|
const component_cond_1 = __webpack_require__(/*! ../expressions/component_cond */ "../core/build/src/abap/5_syntax/expressions/component_cond.js");
|
|
37417
37417
|
const basic_1 = __webpack_require__(/*! ../../types/basic */ "../core/build/src/abap/types/basic/index.js");
|
|
37418
|
+
const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "../core/build/src/abap/5_syntax/_syntax_input.js");
|
|
37418
37419
|
class DeleteInternal {
|
|
37419
37420
|
runSyntax(node, input) {
|
|
37420
37421
|
var _a;
|
|
@@ -37425,7 +37426,8 @@ class DeleteInternal {
|
|
|
37425
37426
|
const target = node.findDirectExpression(Expressions.Target);
|
|
37426
37427
|
if (target) {
|
|
37427
37428
|
let tabl = undefined;
|
|
37428
|
-
|
|
37429
|
+
const localVariable = input.scope.findVariable(target.concatTokens());
|
|
37430
|
+
if (localVariable === undefined && node.getChildren().length === 5 && node.getChildren()[2].concatTokens().toUpperCase() === "FROM") {
|
|
37429
37431
|
// it might be a database table
|
|
37430
37432
|
tabl = (_a = input.scope.getDDIC()) === null || _a === void 0 ? void 0 : _a.lookupTableOrView(target.concatTokens());
|
|
37431
37433
|
if (tabl) {
|
|
@@ -37434,6 +37436,15 @@ class DeleteInternal {
|
|
|
37434
37436
|
}
|
|
37435
37437
|
if (tabl === undefined) {
|
|
37436
37438
|
targetType = target_1.Target.runSyntax(target, input);
|
|
37439
|
+
if (node.findDirectTokenByText("TABLE") === undefined
|
|
37440
|
+
&& node.findDirectTokenByText("ADJACENT") === undefined
|
|
37441
|
+
&& node.findDirectTokenByText("FROM")
|
|
37442
|
+
&& targetType instanceof basic_1.TableType
|
|
37443
|
+
&& targetType.getAccessType() === basic_1.TableAccessType.hashed) {
|
|
37444
|
+
const message = "Implicit or explicit index operation on hashed table is not possible";
|
|
37445
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
37446
|
+
return;
|
|
37447
|
+
}
|
|
37437
37448
|
if (targetType instanceof basic_1.TableType) {
|
|
37438
37449
|
targetType = targetType.getRowType();
|
|
37439
37450
|
}
|
|
@@ -66567,7 +66578,7 @@ class Registry {
|
|
|
66567
66578
|
}
|
|
66568
66579
|
static abaplintVersion() {
|
|
66569
66580
|
// magic, see build script "version.js"
|
|
66570
|
-
return "2.119.
|
|
66581
|
+
return "2.119.40";
|
|
66571
66582
|
}
|
|
66572
66583
|
getDDICReferences() {
|
|
66573
66584
|
return this.ddicReferences;
|
|
@@ -89434,6 +89445,9 @@ class SelectionScreenTextsMissing {
|
|
|
89434
89445
|
key: "selection_screen_texts_missing",
|
|
89435
89446
|
title: "Selection screen texts missing",
|
|
89436
89447
|
shortDescription: `Checks that selection screen parameters and select-options have selection texts`,
|
|
89448
|
+
extendedInformation: `Excludes parameters and select-options that:
|
|
89449
|
+
* are inside a "SELECTION-SCREEN BEGIN OF LINE" block
|
|
89450
|
+
* have the addition "NO-DISPLAY"`,
|
|
89437
89451
|
};
|
|
89438
89452
|
}
|
|
89439
89453
|
getConfig() {
|
|
@@ -89459,7 +89473,7 @@ class SelectionScreenTextsMissing {
|
|
|
89459
89473
|
this.checkFile(obj.getMainABAPFile(), selTexts, output, checked);
|
|
89460
89474
|
return output;
|
|
89461
89475
|
}
|
|
89462
|
-
checkFile(file, selTexts, output, checked) {
|
|
89476
|
+
checkFile(file, selTexts, output, checked, mainProgName = undefined) {
|
|
89463
89477
|
if (file === undefined) {
|
|
89464
89478
|
return;
|
|
89465
89479
|
}
|
|
@@ -89467,26 +89481,44 @@ class SelectionScreenTextsMissing {
|
|
|
89467
89481
|
return;
|
|
89468
89482
|
}
|
|
89469
89483
|
checked.add(file.getFilename());
|
|
89484
|
+
let inLine = false;
|
|
89470
89485
|
for (const stat of file.getStatements()) {
|
|
89471
89486
|
const s = stat.get();
|
|
89472
|
-
if (s instanceof statements_1.
|
|
89473
|
-
const
|
|
89474
|
-
if (
|
|
89475
|
-
|
|
89476
|
-
if (selTexts[fieldName] === undefined) {
|
|
89477
|
-
output.push(issue_1.Issue.atToken(file, fieldNode.getFirstToken(), `Selection text missing for "${fieldName}"`, this.getMetadata().key, this.conf.severity));
|
|
89478
|
-
}
|
|
89487
|
+
if (s instanceof statements_1.SelectionScreen) {
|
|
89488
|
+
const tokens = stat.concatTokens().toUpperCase();
|
|
89489
|
+
if (tokens.includes("BEGIN OF LINE")) {
|
|
89490
|
+
inLine = true;
|
|
89479
89491
|
}
|
|
89492
|
+
else if (tokens.includes("END OF LINE")) {
|
|
89493
|
+
// known issue: doesn't support BEGIN and END OF LINE span across several includes (not seen a lot in the wild)
|
|
89494
|
+
inLine = false;
|
|
89495
|
+
}
|
|
89496
|
+
continue;
|
|
89480
89497
|
}
|
|
89481
|
-
|
|
89498
|
+
if (s instanceof statements_1.Include) {
|
|
89482
89499
|
const nameNode = stat.findFirstExpression(expressions_1.IncludeName);
|
|
89483
89500
|
if (nameNode) {
|
|
89484
89501
|
const inclName = nameNode.getFirstToken().getStr().toUpperCase();
|
|
89485
89502
|
const inclObj = this.reg.getObject("PROG", inclName);
|
|
89486
89503
|
if (inclObj) {
|
|
89487
|
-
this.checkFile(inclObj.getMainABAPFile(), selTexts, output, checked);
|
|
89504
|
+
this.checkFile(inclObj.getMainABAPFile(), selTexts, output, checked, mainProgName !== null && mainProgName !== void 0 ? mainProgName : file.getFilename());
|
|
89488
89505
|
}
|
|
89489
89506
|
}
|
|
89507
|
+
continue;
|
|
89508
|
+
}
|
|
89509
|
+
if (inLine || !(s instanceof statements_1.Parameter || s instanceof statements_1.SelectOption)) {
|
|
89510
|
+
continue;
|
|
89511
|
+
}
|
|
89512
|
+
if (stat.concatTokens().toUpperCase().includes("NO-DISPLAY")) {
|
|
89513
|
+
continue;
|
|
89514
|
+
}
|
|
89515
|
+
const fieldNode = stat.findFirstExpression(expressions_1.FieldSub);
|
|
89516
|
+
if (fieldNode) {
|
|
89517
|
+
const fieldName = fieldNode.getFirstToken().getStr().toUpperCase();
|
|
89518
|
+
if (selTexts[fieldName] === undefined) {
|
|
89519
|
+
const suffix = mainProgName ? `, ${mainProgName}` : ``;
|
|
89520
|
+
output.push(issue_1.Issue.atToken(file, fieldNode.getFirstToken(), `Selection text missing for "${fieldName}"${suffix}`, this.getMetadata().key, this.conf.severity));
|
|
89521
|
+
}
|
|
89490
89522
|
}
|
|
89491
89523
|
}
|
|
89492
89524
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.119.
|
|
3
|
+
"version": "2.119.40",
|
|
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.119.
|
|
41
|
+
"@abaplint/core": "^2.119.40",
|
|
42
42
|
"@types/chai": "^4.3.20",
|
|
43
43
|
"@types/minimist": "^1.2.5",
|
|
44
44
|
"@types/mocha": "^10.0.10",
|