@abaplint/core 2.119.12 → 2.119.13
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.
|
@@ -6,7 +6,7 @@ const version_1 = require("../../../version");
|
|
|
6
6
|
const expressions_1 = require("../expressions");
|
|
7
7
|
class Return {
|
|
8
8
|
getMatcher() {
|
|
9
|
-
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)));
|
|
9
|
+
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)));
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
exports.Return = Return;
|
package/build/src/registry.js
CHANGED
|
@@ -7,10 +7,14 @@ const _basic_rule_config_1 = require("./_basic_rule_config");
|
|
|
7
7
|
const _irule_1 = require("./_irule");
|
|
8
8
|
const edit_helper_1 = require("../edit_helper");
|
|
9
9
|
const _statement_1 = require("../abap/2_statements/statements/_statement");
|
|
10
|
+
const objects_1 = require("../objects");
|
|
11
|
+
const ddic_1 = require("../ddic");
|
|
10
12
|
class UnnecessaryChainingConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
11
13
|
constructor() {
|
|
12
14
|
super(...arguments);
|
|
13
15
|
this.maxIssuesPerFile = 10;
|
|
16
|
+
/** Ignore global exception classes */
|
|
17
|
+
this.ignoreExceptions = true;
|
|
14
18
|
}
|
|
15
19
|
}
|
|
16
20
|
exports.UnnecessaryChainingConf = UnnecessaryChainingConf;
|
|
@@ -36,8 +40,15 @@ class UnnecessaryChaining extends _abap_rule_1.ABAPRule {
|
|
|
36
40
|
setConfig(conf) {
|
|
37
41
|
this.conf = conf;
|
|
38
42
|
}
|
|
39
|
-
runParsed(file) {
|
|
43
|
+
runParsed(file, obj) {
|
|
40
44
|
const issues = [];
|
|
45
|
+
if (obj instanceof objects_1.Class) {
|
|
46
|
+
const definition = obj.getClassDefinition();
|
|
47
|
+
const ddic = new ddic_1.DDIC(this.reg);
|
|
48
|
+
if (this.conf.ignoreExceptions === true && ddic.isException(definition, obj)) {
|
|
49
|
+
return issues;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
41
52
|
let max = this.getConfig().maxIssuesPerFile;
|
|
42
53
|
if (max === undefined || max < 1) {
|
|
43
54
|
max = 10;
|