@abaplint/core 2.113.0 → 2.113.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.
@@ -16,6 +16,8 @@ exports.DECLARATION_STUFF = [
16
16
  Statements.Data,
17
17
  Statements.DataBegin,
18
18
  Statements.Constant,
19
+ Statements.Tables,
20
+ Statements.Include, // this is not super correct, but anyhow
19
21
  Statements.Parameter,
20
22
  Statements.SelectionScreen,
21
23
  Statements.ConstantBegin,
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.0";
70
+ return "2.113.1";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
@@ -21,25 +21,25 @@ class AddTestAttributes extends _abap_rule_1.ABAPRule {
21
21
  title: "Add test attributes for tests classes with test methods",
22
22
  shortDescription: `Add test attributes DURATION and RISK LEVEL for tests classes with test methods`,
23
23
  tags: [_irule_1.RuleTag.SingleFile],
24
- badExample: `CLASS ltcl_test DEFINITION FINAL FOR TESTING.
24
+ badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
25
25
  PUBLIC SECTION.
26
26
  PROTECTED SECTION.
27
27
  PRIVATE SECTION.
28
28
  METHODS test FOR TESTING RAISING cx_static_check.
29
29
  ENDCLASS.
30
30
 
31
- CLASS ltcl_test IMPLEMENTATION.
31
+ CLASS ltcl_test1 IMPLEMENTATION.
32
32
  METHOD test.
33
33
  ENDMETHOD.
34
34
  ENDCLASS.`,
35
- goodExample: `CLASS ltcl_test DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
35
+ goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
36
36
  PUBLIC SECTION.
37
37
  PROTECTED SECTION.
38
38
  PRIVATE SECTION.
39
39
  METHODS test FOR TESTING RAISING cx_static_check.
40
40
  ENDCLASS.
41
41
 
42
- CLASS ltcl_test IMPLEMENTATION.
42
+ CLASS ltcl_test2 IMPLEMENTATION.
43
43
  METHOD test.
44
44
  ENDMETHOD.
45
45
  ENDCLASS.`,
@@ -23,12 +23,11 @@ class EmptyEvent extends _abap_rule_1.ABAPRule {
23
23
  shortDescription: `Empty selection screen or list processing event block`,
24
24
  extendedInformation: ``,
25
25
  tags: [_irule_1.RuleTag.SingleFile],
26
- badExample: `REPORT zfoo.
27
- START-OF-SELECTION.
28
- PERFORM sdf.
29
- COMMIT WORK.
26
+ badExample: `
27
+ INITIALIZATION.
28
+ WRITE 'hello'.
30
29
  END-OF-SELECTION.`,
31
- goodExample: `REPORT zfoo.
30
+ goodExample: `
32
31
  START-OF-SELECTION.
33
32
  PERFORM sdf.
34
33
  COMMIT WORK.`,
@@ -53,6 +52,9 @@ START-OF-SELECTION.
53
52
  let children = [];
54
53
  for (const s of stru.getChildren() || []) {
55
54
  if (selection_events_1.SELECTION_EVENTS.some(f => s.get() instanceof f)) {
55
+ if (currentEvent !== undefined && children.length === 0) {
56
+ issues.push(issue_1.Issue.atStatement(file, currentEvent, "Empty event", this.getMetadata().key, this.getConfig().severity));
57
+ }
56
58
  children = [];
57
59
  currentEvent = s;
58
60
  }
@@ -65,7 +67,11 @@ START-OF-SELECTION.
65
67
  children.push(s);
66
68
  }
67
69
  else {
70
+ if (currentEvent !== undefined && children.length === 0) {
71
+ issues.push(issue_1.Issue.atStatement(file, currentEvent, "Empty event", this.getMetadata().key, this.getConfig().severity));
72
+ }
68
73
  children = [];
74
+ currentEvent = undefined;
69
75
  }
70
76
  }
71
77
  if (currentEvent !== undefined && children.length === 0) {
@@ -28,7 +28,7 @@ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapstart-of-selectio
28
28
  tags: [_irule_1.RuleTag.SingleFile],
29
29
  badExample: `REPORT zfoo.
30
30
  WRITE 'hello'.`,
31
- goodExample: `REPORT zfoo.
31
+ goodExample: `
32
32
  START-OF-SELECTION.
33
33
  WRITE 'hello'.`,
34
34
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.0",
3
+ "version": "2.113.1",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",