@abaplint/core 2.113.239 → 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.
@@ -43,6 +43,7 @@ class DataElement extends _abstract_object_1.AbstractObject {
43
43
  var _a;
44
44
  const references = [];
45
45
  let lookup = undefined;
46
+ this.parse();
46
47
  if (this.parsedXML === undefined) {
47
48
  lookup = { type: new Types.UnknownType("Data Element " + this.getName() + ", parser error") };
48
49
  }
@@ -74,7 +74,7 @@ class Registry {
74
74
  }
75
75
  static abaplintVersion() {
76
76
  // magic, see build script "version.sh"
77
- return "2.113.239";
77
+ return "2.113.241";
78
78
  }
79
79
  getDDICReferences() {
80
80
  return this.ddicReferences;
@@ -6,6 +6,7 @@ const _abap_object_1 = require("../objects/_abap_object");
6
6
  const include_graph_1 = require("../utils/include_graph");
7
7
  const _irule_1 = require("./_irule");
8
8
  const objects_1 = require("../objects");
9
+ const severity_1 = require("../severity");
9
10
  class CheckIncludeConf extends _basic_rule_config_1.BasicRuleConfig {
10
11
  }
11
12
  exports.CheckIncludeConf = CheckIncludeConf;
@@ -34,7 +35,7 @@ class CheckInclude {
34
35
  }
35
36
  initialize(reg) {
36
37
  this.reg = reg;
37
- this.graph = new include_graph_1.IncludeGraph(this.reg);
38
+ this.graph = new include_graph_1.IncludeGraph(this.reg, this.getConfig().severity || severity_1.Severity.Error);
38
39
  return this;
39
40
  }
40
41
  run(obj) {
@@ -60,10 +60,11 @@ class Graph {
60
60
  }
61
61
  }
62
62
  class IncludeGraph {
63
- constructor(reg) {
63
+ constructor(reg, severity = severity_1.Severity.Error) {
64
64
  this.reg = reg;
65
65
  this.issues = [];
66
66
  this.graph = new Graph();
67
+ this.severity = severity;
67
68
  this.build();
68
69
  }
69
70
  listMainForInclude(filename) {
@@ -93,7 +94,7 @@ class IncludeGraph {
93
94
  if (f === undefined) {
94
95
  throw new Error("findUnusedIncludes internal error");
95
96
  }
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
+ 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);
97
98
  ret.push(issue);
98
99
  }
99
100
  return ret;
@@ -121,12 +122,12 @@ class IncludeGraph {
121
122
  if (found === undefined) {
122
123
  const ifFound = s.concatTokens().toUpperCase().includes("IF FOUND");
123
124
  if (ifFound === false) {
124
- const issue = issue_1.Issue.atStatement(f, s, "Include " + name + " not found", new check_include_1.CheckInclude().getMetadata().key, severity_1.Severity.Error);
125
+ const issue = issue_1.Issue.atStatement(f, s, "Include " + name + " not found", new check_include_1.CheckInclude().getMetadata().key, this.severity);
125
126
  this.issues.push(issue);
126
127
  }
127
128
  }
128
129
  else if (found.include === false) {
129
- 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);
130
+ 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);
130
131
  this.issues.push(issue);
131
132
  }
132
133
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.239",
3
+ "version": "2.113.241",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",