@abaplint/cli 2.119.12 → 2.119.14
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 +32 -11
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -16601,7 +16601,7 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
|
|
|
16601
16601
|
const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
16602
16602
|
class Return {
|
|
16603
16603
|
getMatcher() {
|
|
16604
|
-
return (0, combi_1.seq)((0, combi_1.str)("RETURN"), (0, combi_1.optPrio)((0, combi_1.ver)(version_1.Version.v758, expressions_1.Source)));
|
|
16604
|
+
return (0, combi_1.seq)((0, combi_1.str)("RETURN"), (0, combi_1.optPrio)((0, combi_1.ver)(version_1.Version.v758, expressions_1.Source, version_1.Version.OpenABAP)));
|
|
16605
16605
|
}
|
|
16606
16606
|
}
|
|
16607
16607
|
exports.Return = Return;
|
|
@@ -56244,7 +56244,7 @@ class Registry {
|
|
|
56244
56244
|
}
|
|
56245
56245
|
static abaplintVersion() {
|
|
56246
56246
|
// magic, see build script "version.sh"
|
|
56247
|
-
return "2.119.
|
|
56247
|
+
return "2.119.14";
|
|
56248
56248
|
}
|
|
56249
56249
|
getDDICReferences() {
|
|
56250
56250
|
return this.ddicReferences;
|
|
@@ -71601,9 +71601,14 @@ exports.NoAliases = exports.NoAliasesConf = void 0;
|
|
|
71601
71601
|
const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
71602
71602
|
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
71603
71603
|
const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
|
|
71604
|
-
const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
71605
71604
|
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
71605
|
+
const visibility_1 = __webpack_require__(/*! ../abap/4_file_information/visibility */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js");
|
|
71606
71606
|
class NoAliasesConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
71607
|
+
constructor() {
|
|
71608
|
+
super(...arguments);
|
|
71609
|
+
/** Skip reporting aliases in private sections. */
|
|
71610
|
+
this.ignorePrivate = false;
|
|
71611
|
+
}
|
|
71607
71612
|
}
|
|
71608
71613
|
exports.NoAliasesConf = NoAliasesConf;
|
|
71609
71614
|
class NoAliases extends _abap_rule_1.ABAPRule {
|
|
@@ -71616,7 +71621,6 @@ class NoAliases extends _abap_rule_1.ABAPRule {
|
|
|
71616
71621
|
key: "no_aliases",
|
|
71617
71622
|
title: "No ALIASES",
|
|
71618
71623
|
shortDescription: `Detects use of the ALIAS statement`,
|
|
71619
|
-
extendedInformation: `Only one issue is reported for chained statements`,
|
|
71620
71624
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
71621
71625
|
};
|
|
71622
71626
|
}
|
|
@@ -71629,18 +71633,24 @@ class NoAliases extends _abap_rule_1.ABAPRule {
|
|
|
71629
71633
|
runParsed(file) {
|
|
71630
71634
|
const issues = [];
|
|
71631
71635
|
const message = "Do not use ALIASES";
|
|
71632
|
-
|
|
71633
|
-
|
|
71634
|
-
|
|
71635
|
-
if (prev && prev.getColon() === stat.getColon()) {
|
|
71636
|
+
for (const classDef of file.getInfo().listClassDefinitions()) {
|
|
71637
|
+
for (const alias of classDef.aliases) {
|
|
71638
|
+
if (this.skipAlias(alias)) {
|
|
71636
71639
|
continue;
|
|
71637
71640
|
}
|
|
71638
|
-
issues.push(issue_1.Issue.
|
|
71639
|
-
|
|
71641
|
+
issues.push(issue_1.Issue.atIdentifier(alias.identifier, message, this.getMetadata().key, this.conf.severity));
|
|
71642
|
+
}
|
|
71643
|
+
}
|
|
71644
|
+
for (const interfaceDef of file.getInfo().listInterfaceDefinitions()) {
|
|
71645
|
+
for (const alias of interfaceDef.aliases) {
|
|
71646
|
+
issues.push(issue_1.Issue.atIdentifier(alias.identifier, message, this.getMetadata().key, this.conf.severity));
|
|
71640
71647
|
}
|
|
71641
71648
|
}
|
|
71642
71649
|
return issues;
|
|
71643
71650
|
}
|
|
71651
|
+
skipAlias(alias) {
|
|
71652
|
+
return this.conf.ignorePrivate === true && alias.visibility === visibility_1.Visibility.Private;
|
|
71653
|
+
}
|
|
71644
71654
|
}
|
|
71645
71655
|
exports.NoAliases = NoAliases;
|
|
71646
71656
|
//# sourceMappingURL=no_aliases.js.map
|
|
@@ -78313,10 +78323,14 @@ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./
|
|
|
78313
78323
|
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
78314
78324
|
const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
|
|
78315
78325
|
const _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js");
|
|
78326
|
+
const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
78327
|
+
const ddic_1 = __webpack_require__(/*! ../ddic */ "./node_modules/@abaplint/core/build/src/ddic.js");
|
|
78316
78328
|
class UnnecessaryChainingConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
78317
78329
|
constructor() {
|
|
78318
78330
|
super(...arguments);
|
|
78319
78331
|
this.maxIssuesPerFile = 10;
|
|
78332
|
+
/** Ignore global exception classes */
|
|
78333
|
+
this.ignoreExceptions = true;
|
|
78320
78334
|
}
|
|
78321
78335
|
}
|
|
78322
78336
|
exports.UnnecessaryChainingConf = UnnecessaryChainingConf;
|
|
@@ -78342,8 +78356,15 @@ class UnnecessaryChaining extends _abap_rule_1.ABAPRule {
|
|
|
78342
78356
|
setConfig(conf) {
|
|
78343
78357
|
this.conf = conf;
|
|
78344
78358
|
}
|
|
78345
|
-
runParsed(file) {
|
|
78359
|
+
runParsed(file, obj) {
|
|
78346
78360
|
const issues = [];
|
|
78361
|
+
if (obj instanceof objects_1.Class) {
|
|
78362
|
+
const definition = obj.getClassDefinition();
|
|
78363
|
+
const ddic = new ddic_1.DDIC(this.reg);
|
|
78364
|
+
if (this.conf.ignoreExceptions === true && ddic.isException(definition, obj)) {
|
|
78365
|
+
return issues;
|
|
78366
|
+
}
|
|
78367
|
+
}
|
|
78347
78368
|
let max = this.getConfig().maxIssuesPerFile;
|
|
78348
78369
|
if (max === undefined || max < 1) {
|
|
78349
78370
|
max = 10;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.119.
|
|
3
|
+
"version": "2.119.14",
|
|
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.14",
|
|
42
42
|
"@types/chai": "^4.3.20",
|
|
43
43
|
"@types/minimist": "^1.2.5",
|
|
44
44
|
"@types/mocha": "^10.0.10",
|