@abaplint/cli 2.113.138 → 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.
Files changed (2) hide show
  1. package/build/cli.js +25 -24
  2. package/package.json +3 -3
package/build/cli.js CHANGED
@@ -49079,12 +49079,14 @@ class FunctionGroup extends _abap_object_1.ABAPObject {
49079
49079
  }
49080
49080
  if ((i.startsWith("L") || namespaced) && f.getFilename().includes(search.toLowerCase() + ".")) {
49081
49081
  ret.push({ file: f, name: i });
49082
+ break;
49082
49083
  }
49083
49084
  // fix for URL encoded? Uris
49084
49085
  if (namespaced) {
49085
49086
  search = i.replace(/\//g, "%23");
49086
49087
  if (f.getFilename().includes(search.toLowerCase() + ".")) {
49087
49088
  ret.push({ file: f, name: i });
49089
+ break;
49088
49090
  }
49089
49091
  }
49090
49092
  }
@@ -54573,7 +54575,7 @@ class Registry {
54573
54575
  }
54574
54576
  static abaplintVersion() {
54575
54577
  // magic, see build script "version.sh"
54576
- return "2.113.138";
54578
+ return "2.113.140";
54577
54579
  }
54578
54580
  getDDICReferences() {
54579
54581
  return this.ddicReferences;
@@ -77411,8 +77413,9 @@ class RulesRunner {
77411
77413
  }
77412
77414
  (_c = input === null || input === void 0 ? void 0 : input.progress) === null || _c === void 0 ? void 0 : _c.set(rules.length, "Initialize Rules");
77413
77415
  for (const rule of rules) {
77416
+ const start = Date.now();
77414
77417
  if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {
77415
- process.stderr.write("Initializing rule " + rule.getMetadata().key + "\n");
77418
+ process.stderr.write("Initializing rule " + rule.getMetadata().key);
77416
77419
  }
77417
77420
  else {
77418
77421
  (_d = input === null || input === void 0 ? void 0 : input.progress) === null || _d === void 0 ? void 0 : _d.tick("Initialize Rules - " + rule.getMetadata().key);
@@ -77421,6 +77424,9 @@ class RulesRunner {
77421
77424
  throw new Error(rule.getMetadata().key + " missing initialize method");
77422
77425
  }
77423
77426
  rule.initialize(this.reg);
77427
+ if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {
77428
+ process.stderr.write(", " + (Date.now() - start) + "ms\n");
77429
+ }
77424
77430
  rulePerformance[rule.getMetadata().key] = 0;
77425
77431
  }
77426
77432
  (_e = input === null || input === void 0 ? void 0 : input.progress) === null || _e === void 0 ? void 0 : _e.set(check.length, "Finding Issues");
@@ -77853,7 +77859,9 @@ class Graph {
77853
77859
  this.edges = {};
77854
77860
  }
77855
77861
  addVertex(vertex) {
77856
- this.verticesIncludenameIndex[vertex.includeName.toUpperCase()] = vertex;
77862
+ if (vertex.includeName !== undefined) {
77863
+ this.verticesIncludenameIndex[vertex.includeName.toUpperCase()] = vertex;
77864
+ }
77857
77865
  this.verticesFilenameIndex[vertex.filename.toUpperCase()] = vertex;
77858
77866
  }
77859
77867
  findVertexViaIncludename(includeName) {
@@ -77889,9 +77897,6 @@ class IncludeGraph {
77889
77897
  this.graph = new Graph();
77890
77898
  this.build();
77891
77899
  }
77892
- getIssues() {
77893
- return this.issues;
77894
- }
77895
77900
  listMainForInclude(filename) {
77896
77901
  const ret = [];
77897
77902
  if (filename === undefined) {
@@ -77911,6 +77916,17 @@ class IncludeGraph {
77911
77916
  ret.push(i);
77912
77917
  }
77913
77918
  }
77919
+ const v = this.graph.findVertexByFilename(file.getFilename());
77920
+ if (v !== undefined
77921
+ && v.include === true
77922
+ && this.listMainForInclude(v.filename).length === 0) {
77923
+ const f = this.reg.getFileByName(v.filename);
77924
+ if (f === undefined) {
77925
+ throw new Error("findUnusedIncludes internal error");
77926
+ }
77927
+ 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);
77928
+ ret.push(issue);
77929
+ }
77914
77930
  return ret;
77915
77931
  }
77916
77932
  ///////////////////////////////
@@ -77951,21 +77967,6 @@ class IncludeGraph {
77951
77967
  }
77952
77968
  }
77953
77969
  }
77954
- this.findUnusedIncludes();
77955
- }
77956
- findUnusedIncludes() {
77957
- for (const v of Object.values(this.graph.verticesFilenameIndex)) {
77958
- if (v.include === true) {
77959
- if (this.listMainForInclude(v.filename).length === 0) {
77960
- const f = this.reg.getFileByName(v.filename);
77961
- if (f === undefined) {
77962
- throw new Error("findUnusedIncludes internal error");
77963
- }
77964
- 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);
77965
- this.issues.push(issue);
77966
- }
77967
- }
77968
- }
77969
77970
  }
77970
77971
  addVertices() {
77971
77972
  for (const o of getABAPObjects(this.reg)) {
@@ -77984,7 +77985,7 @@ class IncludeGraph {
77984
77985
  if (file) {
77985
77986
  this.graph.addVertex({
77986
77987
  filename: file.getFilename(),
77987
- includeName: o.getName(),
77988
+ includeName: undefined,
77988
77989
  include: false
77989
77990
  });
77990
77991
  }
@@ -77993,7 +77994,7 @@ class IncludeGraph {
77993
77994
  for (const f of o.getSequencedFiles()) {
77994
77995
  this.graph.addVertex({
77995
77996
  filename: f.getFilename(),
77996
- includeName: o.getName(),
77997
+ includeName: undefined,
77997
77998
  include: false
77998
77999
  });
77999
78000
  }
@@ -78010,7 +78011,7 @@ class IncludeGraph {
78010
78011
  if (file) {
78011
78012
  this.graph.addVertex({
78012
78013
  filename: file.getFilename(),
78013
- includeName: o.getName(),
78014
+ includeName: undefined, // this is the SAPL program
78014
78015
  include: false
78015
78016
  });
78016
78017
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.138",
3
+ "version": "2.113.140",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,11 +38,11 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.113.138",
41
+ "@abaplint/core": "^2.113.140",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",
45
- "@types/node": "^24.0.10",
45
+ "@types/node": "^24.0.12",
46
46
  "@types/progress": "^2.0.7",
47
47
  "chai": "^4.5.0",
48
48
  "p-limit": "^3.1.0",