@abaplint/core 2.106.7 → 2.106.8

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.
@@ -65,7 +65,7 @@ class Registry {
65
65
  }
66
66
  static abaplintVersion() {
67
67
  // magic, see build script "version.sh"
68
- return "2.106.7";
68
+ return "2.106.8";
69
69
  }
70
70
  getDDICReferences() {
71
71
  return this.ddicReferences;
@@ -70,6 +70,7 @@ Skips:
70
70
  `,
71
71
  tags: [],
72
72
  pragma: "##CALLED",
73
+ pseudoComment: "EC CALLED",
73
74
  };
74
75
  }
75
76
  getConfig() {
@@ -146,11 +147,32 @@ Skips:
146
147
  if (statement.getPragmas().some(t => t.getStr() === this.getMetadata().pragma)) {
147
148
  continue;
148
149
  }
150
+ else if (this.suppressedbyPseudo(statement, file)) {
151
+ continue;
152
+ }
149
153
  const message = "Method \"" + i.identifier.getName() + "\" not used";
150
154
  issues.push(issue_1.Issue.atIdentifier(i.identifier, message, this.getMetadata().key, this.conf.severity));
151
155
  }
152
156
  return issues;
153
157
  }
158
+ suppressedbyPseudo(statement, file) {
159
+ if (statement === undefined) {
160
+ return false;
161
+ }
162
+ if (file === undefined) {
163
+ return false;
164
+ }
165
+ let next = false;
166
+ for (const s of file.getStatements()) {
167
+ if (next === true && s.get() instanceof _statement_1.Comment) {
168
+ return s.concatTokens().includes(this.getMetadata().pseudoComment + "");
169
+ }
170
+ if (s === statement) {
171
+ next = true;
172
+ }
173
+ }
174
+ return false;
175
+ }
154
176
  searchGlobalSubclasses(obj) {
155
177
  var _a, _b;
156
178
  if (this.wa.getLength() === 0
@@ -59,6 +59,7 @@ class UnusedTypes {
59
59
  extendedInformation: `Unused types are not reported if the object contains parser or syntax errors.`,
60
60
  tags: [_irule_1.RuleTag.Quickfix],
61
61
  pragma: "##NEEDED",
62
+ pseudoComment: "EC NEEDED",
62
63
  };
63
64
  }
64
65
  getConfig() {
@@ -126,11 +127,32 @@ class UnusedTypes {
126
127
  if (statement.getPragmas().some(t => t.getStr() === this.getMetadata().pragma)) {
127
128
  continue;
128
129
  }
130
+ else if (this.suppressedbyPseudo(statement, file)) {
131
+ continue;
132
+ }
129
133
  const fix = this.buildFix(file, statement);
130
134
  ret.push(issue_1.Issue.atIdentifier(t, message, this.getMetadata().key, this.conf.severity, fix));
131
135
  }
132
136
  return ret;
133
137
  }
138
+ suppressedbyPseudo(statement, file) {
139
+ if (statement === undefined) {
140
+ return false;
141
+ }
142
+ if (file === undefined) {
143
+ return false;
144
+ }
145
+ let next = false;
146
+ for (const s of file.getStatements()) {
147
+ if (next === true && s.get() instanceof _statement_1.Comment) {
148
+ return s.concatTokens().includes(this.getMetadata().pseudoComment + "");
149
+ }
150
+ if (s === statement) {
151
+ next = true;
152
+ }
153
+ }
154
+ return false;
155
+ }
134
156
  ////////////////////////////
135
157
  traverse(node, obj, add) {
136
158
  if (node.getIdentifier().stype !== _scope_type_1.ScopeType.BuiltIn) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.106.7",
3
+ "version": "2.106.8",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",