@abaplint/cli 2.116.1 → 2.117.0
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 +101 -1
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -52638,6 +52638,10 @@ class Program extends _abap_object_1.ABAPObject {
|
|
|
52638
52638
|
this.parseXML();
|
|
52639
52639
|
return this.parsedXML.dynpros || [];
|
|
52640
52640
|
}
|
|
52641
|
+
getSelectionTexts() {
|
|
52642
|
+
this.parseXML();
|
|
52643
|
+
return this.parsedXML.selectionTexts;
|
|
52644
|
+
}
|
|
52641
52645
|
////////////////////////////
|
|
52642
52646
|
parseXML() {
|
|
52643
52647
|
var _a, _b, _c;
|
|
@@ -52652,14 +52656,19 @@ class Program extends _abap_object_1.ABAPObject {
|
|
|
52652
52656
|
isModulePool: false,
|
|
52653
52657
|
description: undefined,
|
|
52654
52658
|
dynpros: [],
|
|
52659
|
+
selectionTexts: {},
|
|
52655
52660
|
};
|
|
52656
52661
|
return;
|
|
52657
52662
|
}
|
|
52658
52663
|
let description = "";
|
|
52664
|
+
const selectionTexts = {};
|
|
52659
52665
|
for (const t of (0, xml_utils_1.xmlToArray)((_c = (_b = (_a = parsed.abapGit) === null || _a === void 0 ? void 0 : _a["asx:abap"]["asx:values"]) === null || _b === void 0 ? void 0 : _b.TPOOL) === null || _c === void 0 ? void 0 : _c.item)) {
|
|
52660
52666
|
if ((t === null || t === void 0 ? void 0 : t.ID) === "R") {
|
|
52661
52667
|
description = t.ENTRY ? (0, xml_utils_1.unescape)(t.ENTRY) : "";
|
|
52662
52668
|
}
|
|
52669
|
+
else if ((t === null || t === void 0 ? void 0 : t.ID) === "S" && t.KEY !== undefined) {
|
|
52670
|
+
selectionTexts[t.KEY.toUpperCase()] = t.ENTRY ? (0, xml_utils_1.unescape)(t.ENTRY) : "";
|
|
52671
|
+
}
|
|
52663
52672
|
}
|
|
52664
52673
|
const dynpros = (0, _dynpros_1.parseDynpros)(parsed);
|
|
52665
52674
|
this.parsedXML = {
|
|
@@ -52667,6 +52676,7 @@ class Program extends _abap_object_1.ABAPObject {
|
|
|
52667
52676
|
isModulePool: file ? file.getRaw().includes("<SUBC>M</SUBC>") : false,
|
|
52668
52677
|
dynpros: dynpros,
|
|
52669
52678
|
description: description,
|
|
52679
|
+
selectionTexts: selectionTexts,
|
|
52670
52680
|
};
|
|
52671
52681
|
}
|
|
52672
52682
|
}
|
|
@@ -55795,7 +55805,7 @@ class Registry {
|
|
|
55795
55805
|
}
|
|
55796
55806
|
static abaplintVersion() {
|
|
55797
55807
|
// magic, see build script "version.sh"
|
|
55798
|
-
return "2.
|
|
55808
|
+
return "2.117.0";
|
|
55799
55809
|
}
|
|
55800
55810
|
getDDICReferences() {
|
|
55801
55811
|
return this.ddicReferences;
|
|
@@ -67450,6 +67460,7 @@ __exportStar(__webpack_require__(/*! ./select_add_order_by */ "./node_modules/@a
|
|
|
67450
67460
|
__exportStar(__webpack_require__(/*! ./select_performance */ "./node_modules/@abaplint/core/build/src/rules/select_performance.js"), exports);
|
|
67451
67461
|
__exportStar(__webpack_require__(/*! ./select_single_full_key */ "./node_modules/@abaplint/core/build/src/rules/select_single_full_key.js"), exports);
|
|
67452
67462
|
__exportStar(__webpack_require__(/*! ./selection_screen_naming */ "./node_modules/@abaplint/core/build/src/rules/selection_screen_naming.js"), exports);
|
|
67463
|
+
__exportStar(__webpack_require__(/*! ./selection_screen_texts_missing */ "./node_modules/@abaplint/core/build/src/rules/selection_screen_texts_missing.js"), exports);
|
|
67453
67464
|
__exportStar(__webpack_require__(/*! ./sequential_blank */ "./node_modules/@abaplint/core/build/src/rules/sequential_blank.js"), exports);
|
|
67454
67465
|
__exportStar(__webpack_require__(/*! ./short_case */ "./node_modules/@abaplint/core/build/src/rules/short_case.js"), exports);
|
|
67455
67466
|
__exportStar(__webpack_require__(/*! ./sicf_consistency */ "./node_modules/@abaplint/core/build/src/rules/sicf_consistency.js"), exports);
|
|
@@ -75029,6 +75040,95 @@ exports.SelectionScreenNaming = SelectionScreenNaming;
|
|
|
75029
75040
|
|
|
75030
75041
|
/***/ },
|
|
75031
75042
|
|
|
75043
|
+
/***/ "./node_modules/@abaplint/core/build/src/rules/selection_screen_texts_missing.js"
|
|
75044
|
+
/*!***************************************************************************************!*\
|
|
75045
|
+
!*** ./node_modules/@abaplint/core/build/src/rules/selection_screen_texts_missing.js ***!
|
|
75046
|
+
\***************************************************************************************/
|
|
75047
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
75048
|
+
|
|
75049
|
+
"use strict";
|
|
75050
|
+
|
|
75051
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
75052
|
+
exports.SelectionScreenTextsMissing = exports.SelectionScreenTextsMissingConf = void 0;
|
|
75053
|
+
const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
75054
|
+
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
75055
|
+
const statements_1 = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
75056
|
+
const expressions_1 = __webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
75057
|
+
const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
75058
|
+
class SelectionScreenTextsMissingConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
75059
|
+
}
|
|
75060
|
+
exports.SelectionScreenTextsMissingConf = SelectionScreenTextsMissingConf;
|
|
75061
|
+
class SelectionScreenTextsMissing {
|
|
75062
|
+
constructor() {
|
|
75063
|
+
this.conf = new SelectionScreenTextsMissingConf();
|
|
75064
|
+
}
|
|
75065
|
+
getMetadata() {
|
|
75066
|
+
return {
|
|
75067
|
+
key: "selection_screen_texts_missing",
|
|
75068
|
+
title: "Selection screen texts missing",
|
|
75069
|
+
shortDescription: `Checks that selection screen parameters and select-options have selection texts`,
|
|
75070
|
+
};
|
|
75071
|
+
}
|
|
75072
|
+
getConfig() {
|
|
75073
|
+
return this.conf;
|
|
75074
|
+
}
|
|
75075
|
+
setConfig(conf) {
|
|
75076
|
+
this.conf = conf;
|
|
75077
|
+
}
|
|
75078
|
+
initialize(reg) {
|
|
75079
|
+
this.reg = reg;
|
|
75080
|
+
return this;
|
|
75081
|
+
}
|
|
75082
|
+
run(obj) {
|
|
75083
|
+
if (!(obj instanceof objects_1.Program)) {
|
|
75084
|
+
return [];
|
|
75085
|
+
}
|
|
75086
|
+
if (obj.isInclude()) {
|
|
75087
|
+
return [];
|
|
75088
|
+
}
|
|
75089
|
+
const selTexts = obj.getSelectionTexts();
|
|
75090
|
+
const output = [];
|
|
75091
|
+
const checked = new Set();
|
|
75092
|
+
this.checkFile(obj.getMainABAPFile(), selTexts, output, checked);
|
|
75093
|
+
return output;
|
|
75094
|
+
}
|
|
75095
|
+
checkFile(file, selTexts, output, checked) {
|
|
75096
|
+
if (file === undefined) {
|
|
75097
|
+
return;
|
|
75098
|
+
}
|
|
75099
|
+
if (checked.has(file.getFilename())) {
|
|
75100
|
+
return;
|
|
75101
|
+
}
|
|
75102
|
+
checked.add(file.getFilename());
|
|
75103
|
+
for (const stat of file.getStatements()) {
|
|
75104
|
+
const s = stat.get();
|
|
75105
|
+
if (s instanceof statements_1.Parameter || s instanceof statements_1.SelectOption) {
|
|
75106
|
+
const fieldNode = stat.findFirstExpression(expressions_1.FieldSub);
|
|
75107
|
+
if (fieldNode) {
|
|
75108
|
+
const fieldName = fieldNode.getFirstToken().getStr().toUpperCase();
|
|
75109
|
+
if (selTexts[fieldName] === undefined) {
|
|
75110
|
+
output.push(issue_1.Issue.atToken(file, fieldNode.getFirstToken(), `Selection text missing for "${fieldName}"`, this.getMetadata().key, this.conf.severity));
|
|
75111
|
+
}
|
|
75112
|
+
}
|
|
75113
|
+
}
|
|
75114
|
+
else if (s instanceof statements_1.Include) {
|
|
75115
|
+
const nameNode = stat.findFirstExpression(expressions_1.IncludeName);
|
|
75116
|
+
if (nameNode) {
|
|
75117
|
+
const inclName = nameNode.getFirstToken().getStr().toUpperCase();
|
|
75118
|
+
const inclObj = this.reg.getObject("PROG", inclName);
|
|
75119
|
+
if (inclObj) {
|
|
75120
|
+
this.checkFile(inclObj.getMainABAPFile(), selTexts, output, checked);
|
|
75121
|
+
}
|
|
75122
|
+
}
|
|
75123
|
+
}
|
|
75124
|
+
}
|
|
75125
|
+
}
|
|
75126
|
+
}
|
|
75127
|
+
exports.SelectionScreenTextsMissing = SelectionScreenTextsMissing;
|
|
75128
|
+
//# sourceMappingURL=selection_screen_texts_missing.js.map
|
|
75129
|
+
|
|
75130
|
+
/***/ },
|
|
75131
|
+
|
|
75032
75132
|
/***/ "./node_modules/@abaplint/core/build/src/rules/sequential_blank.js"
|
|
75033
75133
|
/*!*************************************************************************!*\
|
|
75034
75134
|
!*** ./node_modules/@abaplint/core/build/src/rules/sequential_blank.js ***!
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.117.0",
|
|
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.
|
|
41
|
+
"@abaplint/core": "^2.117.0",
|
|
42
42
|
"@types/chai": "^4.3.20",
|
|
43
43
|
"@types/minimist": "^1.2.5",
|
|
44
44
|
"@types/mocha": "^10.0.10",
|