@abaplint/core 2.113.139 → 2.113.140

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.
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.139";
70
+ return "2.113.140";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
@@ -72,8 +72,9 @@ class RulesRunner {
72
72
  }
73
73
  (_c = input === null || input === void 0 ? void 0 : input.progress) === null || _c === void 0 ? void 0 : _c.set(rules.length, "Initialize Rules");
74
74
  for (const rule of rules) {
75
+ const start = Date.now();
75
76
  if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {
76
- process.stderr.write("Initializing rule " + rule.getMetadata().key + "\n");
77
+ process.stderr.write("Initializing rule " + rule.getMetadata().key);
77
78
  }
78
79
  else {
79
80
  (_d = input === null || input === void 0 ? void 0 : input.progress) === null || _d === void 0 ? void 0 : _d.tick("Initialize Rules - " + rule.getMetadata().key);
@@ -82,6 +83,9 @@ class RulesRunner {
82
83
  throw new Error(rule.getMetadata().key + " missing initialize method");
83
84
  }
84
85
  rule.initialize(this.reg);
86
+ if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {
87
+ process.stderr.write(", " + (Date.now() - start) + "ms\n");
88
+ }
85
89
  rulePerformance[rule.getMetadata().key] = 0;
86
90
  }
87
91
  (_e = input === null || input === void 0 ? void 0 : input.progress) === null || _e === void 0 ? void 0 : _e.set(check.length, "Finding Issues");
@@ -66,9 +66,6 @@ class IncludeGraph {
66
66
  this.graph = new Graph();
67
67
  this.build();
68
68
  }
69
- getIssues() {
70
- return this.issues;
71
- }
72
69
  listMainForInclude(filename) {
73
70
  const ret = [];
74
71
  if (filename === undefined) {
@@ -88,6 +85,17 @@ class IncludeGraph {
88
85
  ret.push(i);
89
86
  }
90
87
  }
88
+ const v = this.graph.findVertexByFilename(file.getFilename());
89
+ if (v !== undefined
90
+ && v.include === true
91
+ && this.listMainForInclude(v.filename).length === 0) {
92
+ const f = this.reg.getFileByName(v.filename);
93
+ if (f === undefined) {
94
+ throw new Error("findUnusedIncludes internal error");
95
+ }
96
+ const issue = issue_1.Issue.atPosition(f, new position_1.Position(1, 1), "INCLUDE not used anywhere", new check_include_1.CheckInclude().getMetadata().key, severity_1.Severity.Error);
97
+ ret.push(issue);
98
+ }
91
99
  return ret;
92
100
  }
93
101
  ///////////////////////////////
@@ -128,21 +136,6 @@ class IncludeGraph {
128
136
  }
129
137
  }
130
138
  }
131
- this.findUnusedIncludes();
132
- }
133
- findUnusedIncludes() {
134
- for (const v of Object.values(this.graph.verticesFilenameIndex)) {
135
- if (v.include === true) {
136
- if (this.listMainForInclude(v.filename).length === 0) {
137
- const f = this.reg.getFileByName(v.filename);
138
- if (f === undefined) {
139
- throw new Error("findUnusedIncludes internal error");
140
- }
141
- const issue = issue_1.Issue.atPosition(f, new position_1.Position(1, 1), "INCLUDE not used anywhere", new check_include_1.CheckInclude().getMetadata().key, severity_1.Severity.Error);
142
- this.issues.push(issue);
143
- }
144
- }
145
- }
146
139
  }
147
140
  addVertices() {
148
141
  for (const o of getABAPObjects(this.reg)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.139",
3
+ "version": "2.113.140",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -53,7 +53,7 @@
53
53
  "@microsoft/api-extractor": "^7.52.8",
54
54
  "@types/chai": "^4.3.20",
55
55
  "@types/mocha": "^10.0.10",
56
- "@types/node": "^24.0.10",
56
+ "@types/node": "^24.0.12",
57
57
  "chai": "^4.5.0",
58
58
  "eslint": "^9.30.1",
59
59
  "mocha": "^11.7.1",