@abaplint/cli 2.113.240 → 2.113.241

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 +8 -6
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -54883,7 +54883,7 @@ class Registry {
54883
54883
  }
54884
54884
  static abaplintVersion() {
54885
54885
  // magic, see build script "version.sh"
54886
- return "2.113.240";
54886
+ return "2.113.241";
54887
54887
  }
54888
54888
  getDDICReferences() {
54889
54889
  return this.ddicReferences;
@@ -57794,6 +57794,7 @@ const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./nod
57794
57794
  const include_graph_1 = __webpack_require__(/*! ../utils/include_graph */ "./node_modules/@abaplint/core/build/src/utils/include_graph.js");
57795
57795
  const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
57796
57796
  const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
57797
+ const severity_1 = __webpack_require__(/*! ../severity */ "./node_modules/@abaplint/core/build/src/severity.js");
57797
57798
  class CheckIncludeConf extends _basic_rule_config_1.BasicRuleConfig {
57798
57799
  }
57799
57800
  exports.CheckIncludeConf = CheckIncludeConf;
@@ -57822,7 +57823,7 @@ class CheckInclude {
57822
57823
  }
57823
57824
  initialize(reg) {
57824
57825
  this.reg = reg;
57825
- this.graph = new include_graph_1.IncludeGraph(this.reg);
57826
+ this.graph = new include_graph_1.IncludeGraph(this.reg, this.getConfig().severity || severity_1.Severity.Error);
57826
57827
  return this;
57827
57828
  }
57828
57829
  run(obj) {
@@ -78520,10 +78521,11 @@ class Graph {
78520
78521
  }
78521
78522
  }
78522
78523
  class IncludeGraph {
78523
- constructor(reg) {
78524
+ constructor(reg, severity = severity_1.Severity.Error) {
78524
78525
  this.reg = reg;
78525
78526
  this.issues = [];
78526
78527
  this.graph = new Graph();
78528
+ this.severity = severity;
78527
78529
  this.build();
78528
78530
  }
78529
78531
  listMainForInclude(filename) {
@@ -78553,7 +78555,7 @@ class IncludeGraph {
78553
78555
  if (f === undefined) {
78554
78556
  throw new Error("findUnusedIncludes internal error");
78555
78557
  }
78556
- 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);
78558
+ const issue = issue_1.Issue.atPosition(f, new position_1.Position(1, 1), "INCLUDE not used anywhere", new check_include_1.CheckInclude().getMetadata().key, this.severity);
78557
78559
  ret.push(issue);
78558
78560
  }
78559
78561
  return ret;
@@ -78581,12 +78583,12 @@ class IncludeGraph {
78581
78583
  if (found === undefined) {
78582
78584
  const ifFound = s.concatTokens().toUpperCase().includes("IF FOUND");
78583
78585
  if (ifFound === false) {
78584
- const issue = issue_1.Issue.atStatement(f, s, "Include " + name + " not found", new check_include_1.CheckInclude().getMetadata().key, severity_1.Severity.Error);
78586
+ const issue = issue_1.Issue.atStatement(f, s, "Include " + name + " not found", new check_include_1.CheckInclude().getMetadata().key, this.severity);
78585
78587
  this.issues.push(issue);
78586
78588
  }
78587
78589
  }
78588
78590
  else if (found.include === false) {
78589
- const issue = issue_1.Issue.atStatement(f, s, "Not possible to INCLUDE a main program, " + name, new check_include_1.CheckInclude().getMetadata().key, severity_1.Severity.Error);
78591
+ const issue = issue_1.Issue.atStatement(f, s, "Not possible to INCLUDE a main program, " + name, new check_include_1.CheckInclude().getMetadata().key, this.severity);
78590
78592
  this.issues.push(issue);
78591
78593
  }
78592
78594
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.240",
3
+ "version": "2.113.241",
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.113.240",
41
+ "@abaplint/core": "^2.113.241",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",