@abaplint/core 2.102.0 → 2.102.1

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.102.0";
68
+ return "2.102.1";
69
69
  }
70
70
  getDDICReferences() {
71
71
  return this.ddicReferences;
@@ -25,6 +25,12 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
25
25
  badExample: `FORM hello1.
26
26
  WRITE 'world'.
27
27
  RETURN.
28
+ ENDFORM.
29
+
30
+ FORM foo.
31
+ IF 1 = 2.
32
+ RETURN.
33
+ ENDIF.
28
34
  ENDFORM.`,
29
35
  goodExample: `FORM hello2.
30
36
  WRITE 'world'.
@@ -57,11 +63,11 @@ ENDFORM.`,
57
63
  const fix = edit_helper_1.EditHelper.deleteStatement(file, prev);
58
64
  issues.push(issue_1.Issue.atStatement(file, prev, message, this.getMetadata().key, this.getConfig().severity, fix));
59
65
  }
66
+ // note: ENDTRY is not checked, it will usually just make it an empty catch handler, which is also bad
60
67
  const prevprev = statements[i - 2];
61
68
  if (prev && prevprev
62
69
  && prevprev.get() instanceof Statements.Return
63
- && (prev.get() instanceof Statements.EndIf
64
- || prev.get() instanceof Statements.EndTry)) {
70
+ && prev.get() instanceof Statements.EndIf) {
65
71
  const fix = edit_helper_1.EditHelper.deleteStatement(file, prevprev);
66
72
  issues.push(issue_1.Issue.atStatement(file, prevprev, message, this.getMetadata().key, this.getConfig().severity, fix));
67
73
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.102.0",
3
+ "version": "2.102.1",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",