@abaplint/cli 2.102.51 → 2.102.52
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 +42 -14
- package/package.json +4 -4
package/build/cli.js
CHANGED
|
@@ -25674,20 +25674,23 @@ class Select {
|
|
|
25674
25674
|
if (isDynamic) {
|
|
25675
25675
|
throw new Error(`dynamic field list, inlining not possible`);
|
|
25676
25676
|
}
|
|
25677
|
-
|
|
25678
|
-
|
|
25679
|
-
|
|
25680
|
-
|
|
25681
|
-
|
|
25682
|
-
|
|
25683
|
-
|
|
25677
|
+
let type = new basic_1.VoidType("SELECT_todo");
|
|
25678
|
+
if (isSimple.test(field.code)) {
|
|
25679
|
+
for (const dbSource of dbSources) {
|
|
25680
|
+
if (dbSource === undefined) {
|
|
25681
|
+
continue;
|
|
25682
|
+
}
|
|
25683
|
+
const dbType = dbSource.parseType(scope.getRegistry());
|
|
25684
|
+
if (dbType instanceof basic_1.StructureType) {
|
|
25685
|
+
const found = dbType.getComponentByName(field.code);
|
|
25686
|
+
if (found) {
|
|
25687
|
+
type = found;
|
|
25688
|
+
break;
|
|
25689
|
+
}
|
|
25684
25690
|
}
|
|
25685
25691
|
}
|
|
25686
|
-
new inline_data_1.InlineData().runSyntax(inline, scope, filename, type);
|
|
25687
|
-
}
|
|
25688
|
-
else {
|
|
25689
|
-
new inline_data_1.InlineData().runSyntax(inline, scope, filename, new basic_1.VoidType("SELECT_todo"));
|
|
25690
25692
|
}
|
|
25693
|
+
new inline_data_1.InlineData().runSyntax(inline, scope, filename, type);
|
|
25691
25694
|
}
|
|
25692
25695
|
}
|
|
25693
25696
|
}
|
|
@@ -36940,7 +36943,8 @@ class Message {
|
|
|
36940
36943
|
return this.message;
|
|
36941
36944
|
}
|
|
36942
36945
|
getPlaceholderCount() {
|
|
36943
|
-
|
|
36946
|
+
const escaped = (this.getMessage().match(/&&/g) || []).length;
|
|
36947
|
+
return (this.getMessage().match(/&/g) || []).length - escaped * 2;
|
|
36944
36948
|
}
|
|
36945
36949
|
}
|
|
36946
36950
|
exports.Message = Message;
|
|
@@ -49145,7 +49149,7 @@ class Registry {
|
|
|
49145
49149
|
}
|
|
49146
49150
|
static abaplintVersion() {
|
|
49147
49151
|
// magic, see build script "version.sh"
|
|
49148
|
-
return "2.102.
|
|
49152
|
+
return "2.102.52";
|
|
49149
49153
|
}
|
|
49150
49154
|
getDDICReferences() {
|
|
49151
49155
|
return this.ddicReferences;
|
|
@@ -61906,6 +61910,11 @@ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./
|
|
|
61906
61910
|
const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
61907
61911
|
const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
|
|
61908
61912
|
class MSAGConsistencyConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
61913
|
+
constructor() {
|
|
61914
|
+
super(...arguments);
|
|
61915
|
+
/** paramters must be numbered */
|
|
61916
|
+
this.numericParamters = true;
|
|
61917
|
+
}
|
|
61909
61918
|
}
|
|
61910
61919
|
exports.MSAGConsistencyConf = MSAGConsistencyConf;
|
|
61911
61920
|
class MSAGConsistency {
|
|
@@ -61939,7 +61948,7 @@ class MSAGConsistency {
|
|
|
61939
61948
|
}
|
|
61940
61949
|
const numbers = new Set();
|
|
61941
61950
|
for (const message of obj.getMessages()) {
|
|
61942
|
-
// todo, get the right positions in xml file
|
|
61951
|
+
// todo, get the right positions in xml file, and report the issue there
|
|
61943
61952
|
if (!message.getNumber().match(/\d\d\d/)) {
|
|
61944
61953
|
const text = this.getDescription("Message number must be 3 digits: message " + message.getNumber());
|
|
61945
61954
|
const position = new position_1.Position(1, 1);
|
|
@@ -61962,6 +61971,25 @@ class MSAGConsistency {
|
|
|
61962
61971
|
else {
|
|
61963
61972
|
numbers.add(num);
|
|
61964
61973
|
}
|
|
61974
|
+
if (this.getConfig().numericParamters === true) {
|
|
61975
|
+
const placeholderCount = message.getPlaceholderCount();
|
|
61976
|
+
if (placeholderCount > 4) {
|
|
61977
|
+
const text = `More than 4 placeholders in mesasge ${message.getNumber()}`;
|
|
61978
|
+
const position = new position_1.Position(1, 1);
|
|
61979
|
+
const issue = issue_1.Issue.atPosition(obj.getFiles()[0], position, text, this.getMetadata().key, this.conf.severity);
|
|
61980
|
+
issues.push(issue);
|
|
61981
|
+
}
|
|
61982
|
+
for (let i = 1; i <= placeholderCount; i++) {
|
|
61983
|
+
const placeholder = "&" + i;
|
|
61984
|
+
if (message.getMessage().includes(placeholder) === false) {
|
|
61985
|
+
const text = `Expected placeholder ${placeholder} in message ${message.getNumber()}`;
|
|
61986
|
+
const position = new position_1.Position(1, 1);
|
|
61987
|
+
const issue = issue_1.Issue.atPosition(obj.getFiles()[0], position, text, this.getMetadata().key, this.conf.severity);
|
|
61988
|
+
issues.push(issue);
|
|
61989
|
+
break;
|
|
61990
|
+
}
|
|
61991
|
+
}
|
|
61992
|
+
}
|
|
61965
61993
|
}
|
|
61966
61994
|
return issues;
|
|
61967
61995
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.102.
|
|
3
|
+
"version": "2.102.52",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://abaplint.org",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@abaplint/core": "^2.102.
|
|
41
|
+
"@abaplint/core": "^2.102.52",
|
|
42
42
|
"@types/chai": "^4.3.6",
|
|
43
43
|
"@types/glob": "^7.2.0",
|
|
44
44
|
"@types/minimist": "^1.2.3",
|
|
45
45
|
"@types/mocha": "^10.0.2",
|
|
46
|
-
"@types/node": "^20.
|
|
46
|
+
"@types/node": "^20.8.0",
|
|
47
47
|
"@types/progress": "^2.0.5",
|
|
48
|
-
"chai": "^4.3.
|
|
48
|
+
"chai": "^4.3.10",
|
|
49
49
|
"chalk": "^5.3.0",
|
|
50
50
|
"eslint": "^8.50.0",
|
|
51
51
|
"glob": "^7.2.3",
|