@abaplint/cli 2.119.21 → 2.119.22
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 +33 -4
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -56457,7 +56457,7 @@ class Registry {
|
|
|
56457
56457
|
}
|
|
56458
56458
|
static abaplintVersion() {
|
|
56459
56459
|
// magic, see build script "version.sh"
|
|
56460
|
-
return "2.119.
|
|
56460
|
+
return "2.119.22";
|
|
56461
56461
|
}
|
|
56462
56462
|
getDDICReferences() {
|
|
56463
56463
|
return this.ddicReferences;
|
|
@@ -60338,11 +60338,12 @@ class CheckTextElements {
|
|
|
60338
60338
|
}
|
|
60339
60339
|
}
|
|
60340
60340
|
for (const e of expressions) {
|
|
60341
|
+
const mainNameSuffix = mainName !== undefined && mainName.toLowerCase() !== file.getFilename().toLowerCase() ? ", " + mainName : "";
|
|
60341
60342
|
if (e.get() instanceof Expressions.TextElement) {
|
|
60342
60343
|
const token = e.findFirstExpression(Expressions.TextElementKey).getFirstToken();
|
|
60343
60344
|
const key = token.getStr().toUpperCase();
|
|
60344
60345
|
if (texts[key] === undefined) {
|
|
60345
|
-
const message = `Text element "${key}" not found` +
|
|
60346
|
+
const message = `Text element "${key}" not found` + mainNameSuffix;
|
|
60346
60347
|
output.push(issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.conf.severity));
|
|
60347
60348
|
}
|
|
60348
60349
|
}
|
|
@@ -60356,7 +60357,7 @@ class CheckTextElements {
|
|
|
60356
60357
|
found = found.replace(/'/g, "''");
|
|
60357
60358
|
}
|
|
60358
60359
|
if (found === undefined) {
|
|
60359
|
-
const message = `Text element "${key}" not found` +
|
|
60360
|
+
const message = `Text element "${key}" not found` + mainNameSuffix;
|
|
60360
60361
|
output.push(issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.conf.severity));
|
|
60361
60362
|
}
|
|
60362
60363
|
else if (code !== "'" + found + "'"
|
|
@@ -78331,8 +78332,30 @@ class UncaughtException extends _abap_rule_1.ABAPRule {
|
|
|
78331
78332
|
this.check(name, n, file);
|
|
78332
78333
|
}
|
|
78333
78334
|
}
|
|
78335
|
+
else if (r.referenceType === _reference_1.ReferenceType.ConstructorReference
|
|
78336
|
+
&& r.position.getStart().isAfter(start)
|
|
78337
|
+
&& r.position.getEnd().isBefore(end)
|
|
78338
|
+
&& r.resolved instanceof types_1.ClassDefinition) {
|
|
78339
|
+
const method = this.findConstructor(r.resolved, scope);
|
|
78340
|
+
for (const name of (method === null || method === void 0 ? void 0 : method.getRaising()) || []) {
|
|
78341
|
+
this.check(name, n, file);
|
|
78342
|
+
}
|
|
78343
|
+
}
|
|
78334
78344
|
}
|
|
78335
78345
|
}
|
|
78346
|
+
findConstructor(def, scope) {
|
|
78347
|
+
for (const method of def.getMethodDefinitions().getAll()) {
|
|
78348
|
+
if (method instanceof types_1.MethodDefinition && method.getName().toUpperCase() === "CONSTRUCTOR") {
|
|
78349
|
+
return method;
|
|
78350
|
+
}
|
|
78351
|
+
}
|
|
78352
|
+
const sup = def.getSuperClass();
|
|
78353
|
+
if (sup === undefined) {
|
|
78354
|
+
return undefined;
|
|
78355
|
+
}
|
|
78356
|
+
const superDefinition = scope === null || scope === void 0 ? void 0 : scope.findClassDefinition(sup);
|
|
78357
|
+
return superDefinition ? this.findConstructor(superDefinition, scope) : undefined;
|
|
78358
|
+
}
|
|
78336
78359
|
addFromTryStructure(s) {
|
|
78337
78360
|
if (this.sinked === undefined) {
|
|
78338
78361
|
return;
|
|
@@ -80683,7 +80706,13 @@ const Objects = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/
|
|
|
80683
80706
|
const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
80684
80707
|
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
80685
80708
|
const fast_xml_parser_1 = __webpack_require__(/*! fast-xml-parser */ "./node_modules/fast-xml-parser/lib/fxp.cjs");
|
|
80709
|
+
const severity_1 = __webpack_require__(/*! ../severity */ "./node_modules/@abaplint/core/build/src/severity.js");
|
|
80686
80710
|
class XMLConsistencyConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
80711
|
+
constructor() {
|
|
80712
|
+
super(...arguments);
|
|
80713
|
+
/** Problem severity for text and translation length checks */
|
|
80714
|
+
this.textAndTranslationLengthSeverity = severity_1.Severity.Error;
|
|
80715
|
+
}
|
|
80687
80716
|
}
|
|
80688
80717
|
exports.XMLConsistencyConf = XMLConsistencyConf;
|
|
80689
80718
|
class XMLConsistency {
|
|
@@ -80806,7 +80835,7 @@ class XMLConsistency {
|
|
|
80806
80835
|
const max = typeof maxLength === "number" ? maxLength : parseInt(maxLength, 10);
|
|
80807
80836
|
if (text.length > max) {
|
|
80808
80837
|
const prefix = lang ? `[${lang}] ` : "";
|
|
80809
|
-
return issue_1.Issue.atRow(file, 1, `${prefix}${fieldName} "${text}" exceeds maximum length of ${max} characters (actual: ${text.length})`, this.getMetadata().key, this.conf.
|
|
80838
|
+
return issue_1.Issue.atRow(file, 1, `${prefix}${fieldName} "${text}" exceeds maximum length of ${max} characters (actual: ${text.length})`, this.getMetadata().key, this.conf.textAndTranslationLengthSeverity);
|
|
80810
80839
|
}
|
|
80811
80840
|
return undefined;
|
|
80812
80841
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.119.
|
|
3
|
+
"version": "2.119.22",
|
|
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.22",
|
|
42
42
|
"@types/chai": "^4.3.20",
|
|
43
43
|
"@types/minimist": "^1.2.5",
|
|
44
44
|
"@types/mocha": "^10.0.10",
|