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