@abaplint/cli 2.119.13 → 2.119.15

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 +24 -13
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -56244,7 +56244,7 @@ class Registry {
56244
56244
  }
56245
56245
  static abaplintVersion() {
56246
56246
  // magic, see build script "version.sh"
56247
- return "2.119.13";
56247
+ return "2.119.15";
56248
56248
  }
56249
56249
  getDDICReferences() {
56250
56250
  return this.ddicReferences;
@@ -71601,9 +71601,14 @@ exports.NoAliases = exports.NoAliasesConf = void 0;
71601
71601
  const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
71602
71602
  const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
71603
71603
  const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
71604
- const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
71605
71604
  const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
71605
+ const visibility_1 = __webpack_require__(/*! ../abap/4_file_information/visibility */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js");
71606
71606
  class NoAliasesConf extends _basic_rule_config_1.BasicRuleConfig {
71607
+ constructor() {
71608
+ super(...arguments);
71609
+ /** Skip reporting aliases in private sections. */
71610
+ this.ignorePrivate = false;
71611
+ }
71607
71612
  }
71608
71613
  exports.NoAliasesConf = NoAliasesConf;
71609
71614
  class NoAliases extends _abap_rule_1.ABAPRule {
@@ -71616,7 +71621,6 @@ class NoAliases extends _abap_rule_1.ABAPRule {
71616
71621
  key: "no_aliases",
71617
71622
  title: "No ALIASES",
71618
71623
  shortDescription: `Detects use of the ALIAS statement`,
71619
- extendedInformation: `Only one issue is reported for chained statements`,
71620
71624
  tags: [_irule_1.RuleTag.SingleFile],
71621
71625
  };
71622
71626
  }
@@ -71629,18 +71633,24 @@ class NoAliases extends _abap_rule_1.ABAPRule {
71629
71633
  runParsed(file) {
71630
71634
  const issues = [];
71631
71635
  const message = "Do not use ALIASES";
71632
- let prev = undefined;
71633
- for (const stat of file.getStatements()) {
71634
- if (stat.get() instanceof Statements.Aliases) {
71635
- if (prev && prev.getColon() === stat.getColon()) {
71636
+ for (const classDef of file.getInfo().listClassDefinitions()) {
71637
+ for (const alias of classDef.aliases) {
71638
+ if (this.skipAlias(alias)) {
71636
71639
  continue;
71637
71640
  }
71638
- issues.push(issue_1.Issue.atStatement(file, stat, message, this.getMetadata().key, this.conf.severity));
71639
- prev = stat;
71641
+ issues.push(issue_1.Issue.atIdentifier(alias.identifier, message, this.getMetadata().key, this.conf.severity));
71642
+ }
71643
+ }
71644
+ for (const interfaceDef of file.getInfo().listInterfaceDefinitions()) {
71645
+ for (const alias of interfaceDef.aliases) {
71646
+ issues.push(issue_1.Issue.atIdentifier(alias.identifier, message, this.getMetadata().key, this.conf.severity));
71640
71647
  }
71641
71648
  }
71642
71649
  return issues;
71643
71650
  }
71651
+ skipAlias(alias) {
71652
+ return this.conf.ignorePrivate === true && alias.visibility === visibility_1.Visibility.Private;
71653
+ }
71644
71654
  }
71645
71655
  exports.NoAliases = NoAliases;
71646
71656
  //# sourceMappingURL=no_aliases.js.map
@@ -78764,10 +78774,6 @@ class UnreachableCode extends _abap_rule_1.ABAPRule {
78764
78774
  || node.get() instanceof _statement_1.Empty) {
78765
78775
  continue;
78766
78776
  }
78767
- else if (this.isExit(node)) {
78768
- exit = true;
78769
- continue;
78770
- }
78771
78777
  else if (this.isStructure(node.get())) {
78772
78778
  exit = false;
78773
78779
  continue;
@@ -78776,6 +78782,11 @@ class UnreachableCode extends _abap_rule_1.ABAPRule {
78776
78782
  const issue = issue_1.Issue.atStatement(file, node, this.getMessage(), this.getMetadata().key, this.conf.severity);
78777
78783
  output.push(issue);
78778
78784
  exit = false;
78785
+ continue;
78786
+ }
78787
+ else if (this.isExit(node)) {
78788
+ exit = true;
78789
+ continue;
78779
78790
  }
78780
78791
  }
78781
78792
  return output;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.119.13",
3
+ "version": "2.119.15",
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.119.13",
41
+ "@abaplint/core": "^2.119.15",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",