@abaplint/cli 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.
Files changed (2) hide show
  1. package/build/cli.js +45 -1
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -51451,7 +51451,7 @@ class Registry {
51451
51451
  }
51452
51452
  static abaplintVersion() {
51453
51453
  // magic, see build script "version.sh"
51454
- return "2.106.7";
51454
+ return "2.106.8";
51455
51455
  }
51456
51456
  getDDICReferences() {
51457
51457
  return this.ddicReferences;
@@ -71716,6 +71716,7 @@ Skips:
71716
71716
  `,
71717
71717
  tags: [],
71718
71718
  pragma: "##CALLED",
71719
+ pseudoComment: "EC CALLED",
71719
71720
  };
71720
71721
  }
71721
71722
  getConfig() {
@@ -71792,11 +71793,32 @@ Skips:
71792
71793
  if (statement.getPragmas().some(t => t.getStr() === this.getMetadata().pragma)) {
71793
71794
  continue;
71794
71795
  }
71796
+ else if (this.suppressedbyPseudo(statement, file)) {
71797
+ continue;
71798
+ }
71795
71799
  const message = "Method \"" + i.identifier.getName() + "\" not used";
71796
71800
  issues.push(issue_1.Issue.atIdentifier(i.identifier, message, this.getMetadata().key, this.conf.severity));
71797
71801
  }
71798
71802
  return issues;
71799
71803
  }
71804
+ suppressedbyPseudo(statement, file) {
71805
+ if (statement === undefined) {
71806
+ return false;
71807
+ }
71808
+ if (file === undefined) {
71809
+ return false;
71810
+ }
71811
+ let next = false;
71812
+ for (const s of file.getStatements()) {
71813
+ if (next === true && s.get() instanceof _statement_1.Comment) {
71814
+ return s.concatTokens().includes(this.getMetadata().pseudoComment + "");
71815
+ }
71816
+ if (s === statement) {
71817
+ next = true;
71818
+ }
71819
+ }
71820
+ return false;
71821
+ }
71800
71822
  searchGlobalSubclasses(obj) {
71801
71823
  var _a, _b;
71802
71824
  if (this.wa.getLength() === 0
@@ -71907,6 +71929,7 @@ class UnusedTypes {
71907
71929
  extendedInformation: `Unused types are not reported if the object contains parser or syntax errors.`,
71908
71930
  tags: [_irule_1.RuleTag.Quickfix],
71909
71931
  pragma: "##NEEDED",
71932
+ pseudoComment: "EC NEEDED",
71910
71933
  };
71911
71934
  }
71912
71935
  getConfig() {
@@ -71974,11 +71997,32 @@ class UnusedTypes {
71974
71997
  if (statement.getPragmas().some(t => t.getStr() === this.getMetadata().pragma)) {
71975
71998
  continue;
71976
71999
  }
72000
+ else if (this.suppressedbyPseudo(statement, file)) {
72001
+ continue;
72002
+ }
71977
72003
  const fix = this.buildFix(file, statement);
71978
72004
  ret.push(issue_1.Issue.atIdentifier(t, message, this.getMetadata().key, this.conf.severity, fix));
71979
72005
  }
71980
72006
  return ret;
71981
72007
  }
72008
+ suppressedbyPseudo(statement, file) {
72009
+ if (statement === undefined) {
72010
+ return false;
72011
+ }
72012
+ if (file === undefined) {
72013
+ return false;
72014
+ }
72015
+ let next = false;
72016
+ for (const s of file.getStatements()) {
72017
+ if (next === true && s.get() instanceof _statement_1.Comment) {
72018
+ return s.concatTokens().includes(this.getMetadata().pseudoComment + "");
72019
+ }
72020
+ if (s === statement) {
72021
+ next = true;
72022
+ }
72023
+ }
72024
+ return false;
72025
+ }
71982
72026
  ////////////////////////////
71983
72027
  traverse(node, obj, add) {
71984
72028
  if (node.getIdentifier().stype !== _scope_type_1.ScopeType.BuiltIn) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.106.7",
3
+ "version": "2.106.8",
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.106.7",
41
+ "@abaplint/core": "^2.106.8",
42
42
  "@types/chai": "^4.3.14",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",