@abaplint/core 2.94.11 → 2.94.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.
package/build/src/registry.js
CHANGED
|
@@ -15,8 +15,10 @@ class CyclicOOConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
|
15
15
|
* @uniqueItems true
|
|
16
16
|
*/
|
|
17
17
|
this.skip = [];
|
|
18
|
-
/** Skips shared memory enabled classes*/
|
|
18
|
+
/** Skips shared memory enabled classes */
|
|
19
19
|
this.skipSharedMemory = true;
|
|
20
|
+
/** Skip testclass inclues */
|
|
21
|
+
this.skipTestclasses = true;
|
|
20
22
|
}
|
|
21
23
|
}
|
|
22
24
|
exports.CyclicOOConf = CyclicOOConf;
|
|
@@ -32,7 +34,9 @@ class CyclicOO {
|
|
|
32
34
|
shortDescription: `Finds cyclic OO references`,
|
|
33
35
|
extendedInformation: `Runs for global INTF + CLAS objects
|
|
34
36
|
|
|
35
|
-
Objects must be without syntax errors for this rule to take effect
|
|
37
|
+
Objects must be without syntax errors for this rule to take effect
|
|
38
|
+
|
|
39
|
+
References in testclass includes are ignored`,
|
|
36
40
|
};
|
|
37
41
|
}
|
|
38
42
|
getConfig() {
|
|
@@ -99,7 +103,7 @@ Objects must be without syntax errors for this rule to take effect`,
|
|
|
99
103
|
previous[obj.getName()] = true;
|
|
100
104
|
const path = this.findCycle(obj.getName(), obj.getName(), previous);
|
|
101
105
|
if (path) {
|
|
102
|
-
const message = "Cyclic definition/usage: " + path;
|
|
106
|
+
const message = "Cyclic definition/usage: " + obj.getName() + " -> " + path;
|
|
103
107
|
return [issue_1.Issue.atIdentifier(id, message, this.getMetadata().key, this.conf.severity)];
|
|
104
108
|
}
|
|
105
109
|
return [];
|
|
@@ -111,13 +115,13 @@ Objects must be without syntax errors for this rule to take effect`,
|
|
|
111
115
|
}
|
|
112
116
|
for (const e of this.edges[current]) {
|
|
113
117
|
if (e === source) {
|
|
114
|
-
return
|
|
118
|
+
return e;
|
|
115
119
|
}
|
|
116
120
|
if (previous[e] === undefined) { // dont revisit vertices
|
|
117
121
|
previous[e] = true;
|
|
118
122
|
const found = this.findCycle(source, e, previous);
|
|
119
123
|
if (found) {
|
|
120
|
-
return found;
|
|
124
|
+
return e + " -> " + found;
|
|
121
125
|
}
|
|
122
126
|
}
|
|
123
127
|
}
|
|
@@ -131,6 +135,11 @@ Objects must be without syntax errors for this rule to take effect`,
|
|
|
131
135
|
|| r.resolved.getFilename() === _builtin_1.BuiltIn.filename) {
|
|
132
136
|
continue;
|
|
133
137
|
}
|
|
138
|
+
if (this.conf.skipTestclasses === true
|
|
139
|
+
&& (r.position.getFilename().includes(".testclasses.")
|
|
140
|
+
|| r.resolved.getFilename().includes(".testclasses."))) {
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
134
143
|
if (r.referenceType === _reference_1.ReferenceType.ObjectOrientedReference
|
|
135
144
|
&& ((_a = r.extra) === null || _a === void 0 ? void 0 : _a.ooName)) {
|
|
136
145
|
if (this.edges[from] === undefined) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.94.
|
|
3
|
+
"version": "2.94.13",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@types/mocha": "^10.0.1",
|
|
53
53
|
"@types/node": "^18.11.18",
|
|
54
54
|
"chai": "^4.3.7",
|
|
55
|
-
"eslint": "^8.
|
|
55
|
+
"eslint": "^8.31.0",
|
|
56
56
|
"mocha": "^10.2.0",
|
|
57
57
|
"c8": "^7.12.0",
|
|
58
58
|
"source-map-support": "^0.5.21",
|