@abaplint/core 2.107.1 → 2.107.2

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.107.1";
68
+ return "2.107.2";
69
69
  }
70
70
  getDDICReferences() {
71
71
  return this.ddicReferences;
@@ -33,7 +33,8 @@ STATICS BEGIN OF bar.
33
33
  INCLUDE STRUCTURE syst.
34
34
  STATICS END OF bar.`,
35
35
  goodExample: `DATA BEGIN OF foo.
36
- INCLUDE STRUCTURE dselc.
36
+ DATA field TYPE i.
37
+ INCLUDE STRUCTURE dselc.
37
38
  DATA END OF foo.`,
38
39
  };
39
40
  }
@@ -33,6 +33,7 @@ class CommentedCode extends _abap_rule_1.ABAPRule {
33
33
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
34
34
  https://docs.abapopenchecks.org/checks/14/`,
35
35
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
36
+ badExample: `* WRITE 'hello world'.`,
36
37
  };
37
38
  }
38
39
  getMessage() {
@@ -29,6 +29,8 @@ class ContainsTab extends _abap_rule_1.ABAPRule {
29
29
  https://docs.abapopenchecks.org/checks/09/
30
30
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
31
31
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
32
+ badExample: `\tWRITE 'hello world'.`,
33
+ goodExample: ` WRITE 'hello world'.`,
32
34
  };
33
35
  }
34
36
  getMessage() {
@@ -22,6 +22,8 @@ class EmptyStatement extends _abap_rule_1.ABAPRule {
22
22
  title: "Remove empty statement",
23
23
  shortDescription: `Checks for empty statements (an empty statement is a single dot)`,
24
24
  tags: [_irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
25
+ badExample: `WRITE 'hello world'..`,
26
+ goodExample: `WRITE 'hello world'.`,
25
27
  };
26
28
  }
27
29
  getConfig() {
@@ -39,6 +39,24 @@ class Indentation extends _abap_rule_1.ABAPRule {
39
39
  title: "Indentation",
40
40
  shortDescription: `Checks indentation`,
41
41
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
42
+ badExample: `CLASS lcl DEFINITION.
43
+ PRIVATE SECTION.
44
+ METHODS constructor.
45
+ ENDCLASS.
46
+
47
+ CLASS lcl IMPLEMENTATION.
48
+ METHOD constructor.
49
+ ENDMETHOD.
50
+ ENDCLASS.`,
51
+ goodExample: `CLASS lcl DEFINITION.
52
+ PRIVATE SECTION.
53
+ METHODS constructor.
54
+ ENDCLASS.
55
+
56
+ CLASS lcl IMPLEMENTATION.
57
+ METHOD constructor.
58
+ ENDMETHOD.
59
+ ENDCLASS.`,
42
60
  };
43
61
  }
44
62
  getConfig() {
@@ -113,6 +113,8 @@ class KeywordCase extends _abap_rule_1.ABAPRule {
113
113
  shortDescription: `Checks that keywords have the same case. Non-keywords must be lower case.`,
114
114
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-your-pretty-printer-team-settings`,
115
115
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
116
+ badExample: `write 'hello world'.`,
117
+ goodExample: `WRITE 'hello world'.`,
116
118
  };
117
119
  }
118
120
  getConfig() {
@@ -34,6 +34,12 @@ class LocalVariableNames extends _abap_rule_1.ABAPRule {
34
34
  Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
35
35
  Regexes are case-insensitive.`,
36
36
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
37
+ badExample: `FORM bar.
38
+ DATA foo.
39
+ ENDFORM.`,
40
+ goodExample: `FORM bar.
41
+ DATA lv_foo.
42
+ ENDFORM.`,
37
43
  };
38
44
  }
39
45
  getDescription(expected, actual) {
@@ -25,6 +25,15 @@ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscu
25
25
 
26
26
  Interface method names are ignored`,
27
27
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
28
+ badExample: `CLASS lcl DEFINITION.
29
+ PUBLIC SECTION.
30
+ METHODS matches.
31
+ ENDCLASS.
32
+
33
+ CLASS lcl IMPLEMENTATION.
34
+ METHOD matches.
35
+ ENDMETHOD.
36
+ ENDCLASS.`,
28
37
  };
29
38
  }
30
39
  getConfig() {
@@ -23,6 +23,13 @@ class MixReturning extends _abap_rule_1.ABAPRule {
23
23
  // eslint-disable-next-line max-len
24
24
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination`,
25
25
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
26
+ badExample: `CLASS lcl DEFINITION.
27
+ PUBLIC SECTION.
28
+ METHODS
29
+ foobar
30
+ EXPORTING foo TYPE i
31
+ RETURNING VALUE(rv_string) TYPE string.
32
+ ENDCLASS.`,
26
33
  };
27
34
  }
28
35
  getMessage() {
@@ -23,6 +23,10 @@ class PreferReturningToExporting extends _abap_rule_1.ABAPRule {
23
23
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
24
24
  https://docs.abapopenchecks.org/checks/44/`,
25
25
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
26
+ badExample: `CLASS lcl DEFINITION.
27
+ PUBLIC SECTION.
28
+ METHODS test EXPORTING ev_foo TYPE i.
29
+ ENDCLASS.`,
26
30
  };
27
31
  }
28
32
  getConfig() {
@@ -27,6 +27,10 @@ class PreferredCompareOperator extends _abap_rule_1.ABAPRule {
27
27
  title: "Preferred compare operator",
28
28
  shortDescription: `Configure undesired operator variants`,
29
29
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
30
+ badExample: `IF foo EQ bar.
31
+ ENDIF.`,
32
+ goodExample: `IF foo = bar.
33
+ ENDIF.`,
30
34
  };
31
35
  }
32
36
  getDescription(operator) {
@@ -32,6 +32,8 @@ add ORDER BY PRIMARY KEY if in doubt
32
32
 
33
33
  If the target is a sorted/hashed table, no issue is reported`,
34
34
  tags: [_irule_1.RuleTag.SingleFile],
35
+ badExample: `SELECT * FROM db INTO TABLE @DATA(tab).`,
36
+ goodExample: `SELECT * FROM db INTO TABLE @DATA(tab) ORDER BY PRIMARY KEY.`,
35
37
  };
36
38
  }
37
39
  getConfig() {
@@ -28,6 +28,8 @@ class TypesNaming extends _abap_rule_1.ABAPRule {
28
28
  shortDescription: `Allows you to enforce a pattern for TYPES definitions`,
29
29
  extendedInformation: `Does not run for TYPE POOLS`,
30
30
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
31
+ badExample: `TYPES foo TYPE i.`,
32
+ goodExample: `TYPES ty_foo TYPE i.`,
31
33
  };
32
34
  }
33
35
  getConfig() {
@@ -22,6 +22,16 @@ class UseClassBasedExceptions extends _abap_rule_1.ABAPRule {
22
22
  shortDescription: `Use class based exceptions, checks interface and class definitions`,
23
23
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-class-based-exceptions`,
24
24
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
25
+ badExample: `INTERFACE lif.
26
+ METHODS load_data
27
+ EXCEPTIONS
28
+ invalid_parameter.
29
+ ENDINTERFACE.`,
30
+ goodExample: `INTERFACE lif.
31
+ METHODS load_data
32
+ RAISING
33
+ cx_something.
34
+ ENDINTERFACE.`,
25
35
  };
26
36
  }
27
37
  getMessage() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.107.1",
3
+ "version": "2.107.2",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -51,9 +51,9 @@
51
51
  "homepage": "https://abaplint.org",
52
52
  "devDependencies": {
53
53
  "@microsoft/api-extractor": "^7.43.1",
54
- "@types/chai": "^4.3.14",
54
+ "@types/chai": "^4.3.15",
55
55
  "@types/mocha": "^10.0.6",
56
- "@types/node": "^20.12.7",
56
+ "@types/node": "^20.12.8",
57
57
  "chai": "^4.4.1",
58
58
  "eslint": "^8.57.0",
59
59
  "mocha": "^10.4.0",