@abaplint/core 2.120.0 → 2.120.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.
Files changed (136) hide show
  1. package/README.md +6 -6
  2. package/build/src/cds/expressions/cds_define_abstract.js +1 -1
  3. package/build/src/cds/expressions/cds_define_custom.js +1 -1
  4. package/build/src/cds/expressions/cds_define_external_entity.js +1 -1
  5. package/build/src/cds/expressions/cds_define_hierarchy.js +1 -1
  6. package/build/src/cds/expressions/cds_define_projection.js +1 -1
  7. package/build/src/cds/expressions/cds_define_table_entity.js +1 -1
  8. package/build/src/lsp/help.js +10 -10
  9. package/build/src/registry.js +1 -1
  10. package/build/src/rules/7bit_ascii.js +4 -4
  11. package/build/src/rules/abapdoc.js +4 -4
  12. package/build/src/rules/add_test_attributes.js +20 -20
  13. package/build/src/rules/align_parameters.js +40 -40
  14. package/build/src/rules/align_type_expressions.js +28 -28
  15. package/build/src/rules/ambiguous_statement.js +7 -7
  16. package/build/src/rules/avoid_use.js +10 -10
  17. package/build/src/rules/begin_end_names.js +4 -4
  18. package/build/src/rules/begin_single_include.js +13 -13
  19. package/build/src/rules/call_transaction_authority_check.js +3 -3
  20. package/build/src/rules/cds_association_name.js +6 -6
  21. package/build/src/rules/cds_comment_style.js +4 -4
  22. package/build/src/rules/cds_field_order.js +12 -12
  23. package/build/src/rules/cds_legacy_view.js +4 -4
  24. package/build/src/rules/cds_naming.js +7 -7
  25. package/build/src/rules/chain_mainly_declarations.js +4 -4
  26. package/build/src/rules/change_if_to_case.js +8 -8
  27. package/build/src/rules/check_abstract.js +2 -2
  28. package/build/src/rules/check_comments.js +4 -4
  29. package/build/src/rules/check_include.js +4 -4
  30. package/build/src/rules/check_subrc.js +8 -8
  31. package/build/src/rules/class_attribute_names.js +6 -6
  32. package/build/src/rules/classic_exceptions_overlap.js +10 -10
  33. package/build/src/rules/clear_exporting_parameters.js +254 -0
  34. package/build/src/rules/commented_code.js +1 -1
  35. package/build/src/rules/constructor_visibility_public.js +10 -10
  36. package/build/src/rules/contains_tab.js +2 -2
  37. package/build/src/rules/cyclic_oo.js +4 -4
  38. package/build/src/rules/dangerous_statement.js +1 -1
  39. package/build/src/rules/db_operation_in_loop.js +9 -9
  40. package/build/src/rules/definitions_top.js +6 -6
  41. package/build/src/rules/downport.js +83 -83
  42. package/build/src/rules/easy_to_find_messages.js +6 -6
  43. package/build/src/rules/empty_event.js +6 -6
  44. package/build/src/rules/empty_line_in_statement.js +2 -2
  45. package/build/src/rules/empty_structure.js +6 -6
  46. package/build/src/rules/exit_or_check.js +7 -7
  47. package/build/src/rules/expand_macros.js +5 -5
  48. package/build/src/rules/exporting.js +1 -1
  49. package/build/src/rules/forbidden_identifier.js +1 -1
  50. package/build/src/rules/forbidden_void_type.js +2 -2
  51. package/build/src/rules/form_tables_obsolete.js +2 -2
  52. package/build/src/rules/fully_type_itabs.js +2 -2
  53. package/build/src/rules/function_module_recommendations.js +2 -2
  54. package/build/src/rules/functional_writing.js +17 -17
  55. package/build/src/rules/global_class.js +10 -10
  56. package/build/src/rules/identical_conditions.js +12 -12
  57. package/build/src/rules/identical_contents.js +14 -14
  58. package/build/src/rules/identical_descriptions.js +6 -6
  59. package/build/src/rules/identical_move.js +2 -2
  60. package/build/src/rules/if_in_if.js +35 -35
  61. package/build/src/rules/implement_methods.js +3 -3
  62. package/build/src/rules/implicit_start_of_selection.js +4 -4
  63. package/build/src/rules/in_statement_indentation.js +11 -11
  64. package/build/src/rules/indentation.js +16 -16
  65. package/build/src/rules/index.js +1 -0
  66. package/build/src/rules/intf_referencing_clas.js +3 -3
  67. package/build/src/rules/invalid_table_index.js +2 -2
  68. package/build/src/rules/line_break_style.js +2 -2
  69. package/build/src/rules/line_length.js +2 -2
  70. package/build/src/rules/line_only_punc.js +1 -1
  71. package/build/src/rules/local_class_naming.js +2 -2
  72. package/build/src/rules/local_variable_names.js +6 -6
  73. package/build/src/rules/macro_naming.js +2 -2
  74. package/build/src/rules/main_file_contents.js +4 -4
  75. package/build/src/rules/many_parentheses.js +10 -10
  76. package/build/src/rules/max_one_method_parameter_per_line.js +7 -7
  77. package/build/src/rules/max_one_statement.js +5 -5
  78. package/build/src/rules/method_length.js +2 -2
  79. package/build/src/rules/method_overwrites_builtin.js +12 -12
  80. package/build/src/rules/method_parameter_names.js +4 -4
  81. package/build/src/rules/mix_returning.js +8 -8
  82. package/build/src/rules/nesting.js +1 -1
  83. package/build/src/rules/no_aliases.js +5 -5
  84. package/build/src/rules/no_chained_assignment.js +1 -1
  85. package/build/src/rules/no_comments_between_methods.js +12 -12
  86. package/build/src/rules/no_external_form_calls.js +2 -2
  87. package/build/src/rules/no_inline_in_optional_branches.js +11 -11
  88. package/build/src/rules/no_macros.js +4 -4
  89. package/build/src/rules/no_prefixes.js +6 -6
  90. package/build/src/rules/no_public_attributes.js +7 -7
  91. package/build/src/rules/no_yoda_conditions.js +4 -4
  92. package/build/src/rules/nrob_consistency.js +2 -2
  93. package/build/src/rules/obsolete_statement.js +51 -51
  94. package/build/src/rules/omit_parameter_name.js +3 -3
  95. package/build/src/rules/omit_receiving.js +13 -13
  96. package/build/src/rules/parser_702_chaining.js +2 -2
  97. package/build/src/rules/parser_error.js +2 -2
  98. package/build/src/rules/parser_missing_space.js +1 -1
  99. package/build/src/rules/prefer_inline.js +16 -16
  100. package/build/src/rules/prefer_is_not.js +9 -9
  101. package/build/src/rules/prefer_raise_exception_new.js +5 -5
  102. package/build/src/rules/prefer_returning_to_exporting.js +4 -4
  103. package/build/src/rules/prefer_xsdbool.js +2 -2
  104. package/build/src/rules/preferred_compare_operator.js +2 -2
  105. package/build/src/rules/prefix_is_current_class.js +6 -6
  106. package/build/src/rules/reduce_procedural_code.js +17 -17
  107. package/build/src/rules/redundant_conversion.js +2 -2
  108. package/build/src/rules/remove_descriptions.js +4 -4
  109. package/build/src/rules/rfc_error_handling.js +7 -7
  110. package/build/src/rules/select_add_order_by.js +5 -5
  111. package/build/src/rules/select_performance.js +5 -5
  112. package/build/src/rules/select_single_full_key.js +2 -2
  113. package/build/src/rules/selection_screen_texts_missing.js +2 -2
  114. package/build/src/rules/sicf_consistency.js +2 -2
  115. package/build/src/rules/slow_parameter_passing.js +16 -16
  116. package/build/src/rules/space_before_dot.js +2 -2
  117. package/build/src/rules/sql_value_conversion.js +6 -6
  118. package/build/src/rules/start_at_tab.js +1 -1
  119. package/build/src/rules/static_call_via_instance.js +4 -4
  120. package/build/src/rules/strict_sql.js +6 -6
  121. package/build/src/rules/sy_modification.js +6 -6
  122. package/build/src/rules/tabl_enhancement_category.js +2 -2
  123. package/build/src/rules/tables_declared_locally.js +2 -2
  124. package/build/src/rules/type_form_parameters.js +2 -2
  125. package/build/src/rules/unnecessary_pragma.js +29 -29
  126. package/build/src/rules/unnecessary_return.js +11 -11
  127. package/build/src/rules/unused_macros.js +6 -6
  128. package/build/src/rules/unused_methods.js +12 -12
  129. package/build/src/rules/unused_variables.js +12 -12
  130. package/build/src/rules/use_bool_expression.js +8 -8
  131. package/build/src/rules/use_class_based_exceptions.js +8 -8
  132. package/build/src/rules/use_line_exists.js +6 -6
  133. package/build/src/rules/use_new.js +4 -4
  134. package/build/src/rules/when_others_last.js +6 -6
  135. package/build/src/rules/xml_consistency.js +3 -3
  136. package/package.json +72 -72
@@ -23,23 +23,23 @@ class SlowParameterPassing {
23
23
  shortDescription: `Detects slow pass by value passing for methods where parameter is not changed`,
24
24
  extendedInformation: `Method parameters defined in interfaces is not checked`,
25
25
  tags: [_irule_1.RuleTag.Performance, _irule_1.RuleTag.Quickfix],
26
- badExample: `CLASS lcl DEFINITION.
27
- PUBLIC SECTION.
28
- METHODS bar IMPORTING VALUE(sdf) TYPE string.
29
- ENDCLASS.
30
- CLASS lcl IMPLEMENTATION.
31
- METHOD bar.
32
- WRITE sdf.
33
- ENDMETHOD.
26
+ badExample: `CLASS lcl DEFINITION.
27
+ PUBLIC SECTION.
28
+ METHODS bar IMPORTING VALUE(sdf) TYPE string.
29
+ ENDCLASS.
30
+ CLASS lcl IMPLEMENTATION.
31
+ METHOD bar.
32
+ WRITE sdf.
33
+ ENDMETHOD.
34
34
  ENDCLASS.`,
35
- goodExample: `CLASS lcl DEFINITION.
36
- PUBLIC SECTION.
37
- METHODS bar IMPORTING sdf TYPE string.
38
- ENDCLASS.
39
- CLASS lcl IMPLEMENTATION.
40
- METHOD bar.
41
- WRITE sdf.
42
- ENDMETHOD.
35
+ goodExample: `CLASS lcl DEFINITION.
36
+ PUBLIC SECTION.
37
+ METHODS bar IMPORTING sdf TYPE string.
38
+ ENDCLASS.
39
+ CLASS lcl IMPLEMENTATION.
40
+ METHOD bar.
41
+ WRITE sdf.
42
+ ENDMETHOD.
43
43
  ENDCLASS.`,
44
44
  };
45
45
  }
@@ -62,8 +62,8 @@ class SpaceBeforeDot extends _abap_rule_1.ABAPRule {
62
62
  key: "space_before_dot",
63
63
  title: "Space before dot",
64
64
  shortDescription: `Checks for extra spaces before dots at the ends of statements`,
65
- extendedInformation: `
66
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
65
+ extendedInformation: `
66
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
67
67
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,
68
68
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
69
69
  badExample: `WRITE bar .`,
@@ -18,12 +18,12 @@ class SQLValueConversion {
18
18
  key: "sql_value_conversion",
19
19
  title: "Implicit SQL Value Conversion",
20
20
  shortDescription: `Ensure types match when selecting from database`,
21
- extendedInformation: `
22
- * Integer to CHAR conversion
23
- * Integer to NUMC conversion
24
- * NUMC to Integer conversion
25
- * CHAR to Integer conversion
26
- * Source field longer than database field, CHAR -> CHAR
21
+ extendedInformation: `
22
+ * Integer to CHAR conversion
23
+ * Integer to NUMC conversion
24
+ * NUMC to Integer conversion
25
+ * CHAR to Integer conversion
26
+ * Source field longer than database field, CHAR -> CHAR
27
27
  * Source field longer than database field, NUMC -> NUMC`,
28
28
  tags: [],
29
29
  };
@@ -20,7 +20,7 @@ class StartAtTab extends _abap_rule_1.ABAPRule {
20
20
  key: "start_at_tab",
21
21
  title: "Start at tab",
22
22
  shortDescription: `Checks that statements start at tabstops.`,
23
- extendedInformation: `Reports max 100 issues per file
23
+ extendedInformation: `Reports max 100 issues per file
24
24
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
25
25
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
26
26
  badExample: ` WRITE a.`,
@@ -29,11 +29,11 @@ class StaticCallViaInstance extends _abap_rule_1.ABAPRule {
29
29
  shortDescription: `Static method call via instance variable`,
30
30
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-call-static-methods-through-instance-variables`,
31
31
  tags: [_irule_1.RuleTag.Styleguide],
32
- badExample: `METHOD run.
33
- NEW lcl_helper( )->static_method( ).
32
+ badExample: `METHOD run.
33
+ NEW lcl_helper( )->static_method( ).
34
34
  ENDMETHOD.`,
35
- goodExample: `METHOD run.
36
- lcl_helper=>static_method( ).
35
+ goodExample: `METHOD run.
36
+ lcl_helper=>static_method( ).
37
37
  ENDMETHOD.`,
38
38
  };
39
39
  }
@@ -55,12 +55,12 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
55
55
  key: "strict_sql",
56
56
  title: "Strict SQL",
57
57
  shortDescription: `Strict SQL`,
58
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
59
-
60
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
61
-
62
- Also see separate rule sql_escape_host_variables
63
-
58
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
59
+
60
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
61
+
62
+ Also see separate rule sql_escape_host_variables
63
+
64
64
  Activates from v750 and up`,
65
65
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix],
66
66
  badExample: `SELECT * FROM ztabl INTO TABLE @rt_content WHERE type = @iv_type ORDER BY PRIMARY KEY.`,
@@ -52,14 +52,14 @@ class SyModification extends _abap_rule_1.ABAPRule {
52
52
  key: "sy_modification",
53
53
  title: "Modification of SY fields",
54
54
  shortDescription: `Finds modification of sy fields`,
55
- extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
56
-
57
- Changes to SY-TVAR* fields are not reported
58
-
59
- Modification of SY fields is not allwed in ABAP Cloud language version,
55
+ extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
56
+
57
+ Changes to SY-TVAR* fields are not reported
58
+
59
+ Modification of SY fields is not allwed in ABAP Cloud language version,
60
60
  https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/ABENSYSTEM_FIELDS.html`,
61
61
  tags: [_irule_1.RuleTag.SingleFile],
62
- badExample: `sy-uname = 2.
62
+ badExample: `sy-uname = 2.
63
63
  sy = sy.`,
64
64
  };
65
65
  }
@@ -17,8 +17,8 @@ class TABLEnhancementCategory {
17
17
  key: "tabl_enhancement_category",
18
18
  title: "TABL enhancement category must be set",
19
19
  shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,
20
- extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
21
-
20
+ extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
21
+
22
22
  You may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,
23
23
  tags: [],
24
24
  };
@@ -55,8 +55,8 @@ class TablesDeclaredLocally extends _abap_rule_1.ABAPRule {
55
55
  shortDescription: `TABLES are always global, so declare them globally`,
56
56
  extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abaptables.htm`,
57
57
  tags: [_irule_1.RuleTag.SingleFile],
58
- badExample: `FORM foo.
59
- TABLES t100.
58
+ badExample: `FORM foo.
59
+ TABLES t100.
60
60
  ENDFORM.`,
61
61
  goodExample: `TABLES t000.`,
62
62
  };
@@ -54,9 +54,9 @@ class TypeFormParameters extends _abap_rule_1.ABAPRule {
54
54
  title: "Type FORM parameters",
55
55
  shortDescription: `Checks for untyped FORM parameters`,
56
56
  tags: [_irule_1.RuleTag.SingleFile],
57
- badExample: `FORM foo USING bar.
57
+ badExample: `FORM foo USING bar.
58
58
  ENDFORM.`,
59
- goodExample: `FORM foo USING bar TYPE string.
59
+ goodExample: `FORM foo USING bar TYPE string.
60
60
  ENDFORM.`,
61
61
  };
62
62
  }
@@ -62,38 +62,38 @@ class UnnecessaryPragma extends _abap_rule_1.ABAPRule {
62
62
  key: "unnecessary_pragma",
63
63
  title: "Unnecessary Pragma",
64
64
  shortDescription: `Finds pragmas which can be removed`,
65
- extendedInformation: `* NO_HANDLER with handler
66
-
67
- * NEEDED without definition
68
-
69
- * NO_TEXT without texts
70
-
71
- * SUBRC_OK where sy-subrc is checked
72
-
65
+ extendedInformation: `* NO_HANDLER with handler
66
+
67
+ * NEEDED without definition
68
+
69
+ * NO_TEXT without texts
70
+
71
+ * SUBRC_OK where sy-subrc is checked
72
+
73
73
  NO_HANDLER inside macros are not checked`,
74
74
  tags: [_irule_1.RuleTag.SingleFile],
75
- badExample: `TRY.
76
- ...
77
- CATCH zcx_abapgit_exception ##NO_HANDLER.
78
- RETURN. " it has a handler
79
- ENDTRY.
80
- MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
81
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
82
- IF sy-subrc <> 0.
75
+ badExample: `TRY.
76
+ ...
77
+ CATCH zcx_abapgit_exception ##NO_HANDLER.
78
+ RETURN. " it has a handler
79
+ ENDTRY.
80
+ MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
81
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
82
+ IF sy-subrc <> 0.
83
83
  ENDIF.`,
84
- goodExample: `TRY.
85
- ...
86
- CATCH zcx_abapgit_exception.
87
- RETURN.
88
- ENDTRY.
89
- MESSAGE w125(zbar) WITH c_foo INTO message.
90
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
91
- IF sy-subrc <> 0.
92
- ENDIF.
93
-
94
- DATA: BEGIN OF blah ##NEEDED,
95
- test1 TYPE string,
96
- test2 TYPE string,
84
+ goodExample: `TRY.
85
+ ...
86
+ CATCH zcx_abapgit_exception.
87
+ RETURN.
88
+ ENDTRY.
89
+ MESSAGE w125(zbar) WITH c_foo INTO message.
90
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
91
+ IF sy-subrc <> 0.
92
+ ENDIF.
93
+
94
+ DATA: BEGIN OF blah ##NEEDED,
95
+ test1 TYPE string,
96
+ test2 TYPE string,
97
97
  END OF blah.`,
98
98
  };
99
99
  }
@@ -61,18 +61,18 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
61
61
  shortDescription: `Finds unnecessary RETURN statements`,
62
62
  extendedInformation: `Finds unnecessary RETURN statements`,
63
63
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
64
- badExample: `FORM hello1.
65
- WRITE 'world'.
66
- RETURN.
67
- ENDFORM.
68
-
69
- FORM foo.
70
- IF 1 = 2.
71
- RETURN.
72
- ENDIF.
64
+ badExample: `FORM hello1.
65
+ WRITE 'world'.
66
+ RETURN.
67
+ ENDFORM.
68
+
69
+ FORM foo.
70
+ IF 1 = 2.
71
+ RETURN.
72
+ ENDIF.
73
73
  ENDFORM.`,
74
- goodExample: `FORM hello2.
75
- WRITE 'world'.
74
+ goodExample: `FORM hello2.
75
+ WRITE 'world'.
76
76
  ENDFORM.`,
77
77
  };
78
78
  }
@@ -26,13 +26,13 @@ class UnusedMacros {
26
26
  title: "Unused macros",
27
27
  shortDescription: `Checks for unused macro definitions definitions`,
28
28
  tags: [_irule_1.RuleTag.Quickfix],
29
- badExample: `DEFINE foobar1.
30
- WRITE 'hello'.
29
+ badExample: `DEFINE foobar1.
30
+ WRITE 'hello'.
31
31
  END-OF-DEFINITION.`,
32
- goodExample: `DEFINE foobar2.
33
- WRITE 'hello'.
34
- END-OF-DEFINITION.
35
-
32
+ goodExample: `DEFINE foobar2.
33
+ WRITE 'hello'.
34
+ END-OF-DEFINITION.
35
+
36
36
  foobar2.`,
37
37
  };
38
38
  }
@@ -93,18 +93,18 @@ class UnusedMethods {
93
93
  key: "unused_methods",
94
94
  title: "Unused methods",
95
95
  shortDescription: `Checks for unused methods`,
96
- extendedInformation: `Checks private and protected methods.
97
-
98
- Unused methods are not reported if the object contains parser or syntax errors.
99
- Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
100
-
101
- Skips:
102
- * methods FOR TESTING
103
- * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
104
- * class_constructor + constructor methods
105
- * event handlers
106
- * methods that are redefined
107
- * INCLUDEs
96
+ extendedInformation: `Checks private and protected methods.
97
+
98
+ Unused methods are not reported if the object contains parser or syntax errors.
99
+ Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
100
+
101
+ Skips:
102
+ * methods FOR TESTING
103
+ * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
104
+ * class_constructor + constructor methods
105
+ * event handlers
106
+ * methods that are redefined
107
+ * INCLUDEs
108
108
  `,
109
109
  tags: [_irule_1.RuleTag.Quickfix],
110
110
  pragma: "##CALLED",
@@ -99,23 +99,23 @@ class UnusedVariables {
99
99
  key: "unused_variables",
100
100
  title: "Unused variables",
101
101
  shortDescription: `Checks for unused variables and constants`,
102
- extendedInformation: `Skips event parameters.
103
-
104
- Note that this currently does not work if the source code uses macros.
105
-
106
- Unused variables are not reported if the object contains parser or syntax errors.
107
-
102
+ extendedInformation: `Skips event parameters.
103
+
104
+ Note that this currently does not work if the source code uses macros.
105
+
106
+ Unused variables are not reported if the object contains parser or syntax errors.
107
+
108
108
  Errors found in INCLUDES are reported for the main program.`,
109
109
  tags: [_irule_1.RuleTag.Quickfix],
110
110
  pragma: "##NEEDED",
111
111
  pseudoComment: "EC NEEDED",
112
- badExample: `DATA: BEGIN OF blah1,
113
- test TYPE string,
114
- test2 TYPE string,
112
+ badExample: `DATA: BEGIN OF blah1,
113
+ test TYPE string,
114
+ test2 TYPE string,
115
115
  END OF blah1.`,
116
- goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
117
- test TYPE string,
118
- test2 TYPE string,
116
+ goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
117
+ test TYPE string,
118
+ test2 TYPE string,
119
119
  END OF blah2.`,
120
120
  };
121
121
  }
@@ -60,15 +60,15 @@ class UseBoolExpression extends _abap_rule_1.ABAPRule {
60
60
  shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,
61
61
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
62
62
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
63
- badExample: `IF line IS INITIAL.
64
- has_entries = abap_false.
65
- ELSE.
66
- has_entries = abap_true.
67
- ENDIF.
68
-
63
+ badExample: `IF line IS INITIAL.
64
+ has_entries = abap_false.
65
+ ELSE.
66
+ has_entries = abap_true.
67
+ ENDIF.
68
+
69
69
  DATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,
70
- goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
71
-
70
+ goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
71
+
72
72
  DATA(fsdf) = xsdbool( foo <> bar ).`,
73
73
  };
74
74
  }
@@ -55,15 +55,15 @@ class UseClassBasedExceptions extends _abap_rule_1.ABAPRule {
55
55
  shortDescription: `Use class based exceptions, checks interface and class definitions`,
56
56
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-class-based-exceptions`,
57
57
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
58
- badExample: `INTERFACE lif.
59
- METHODS load_data
60
- EXCEPTIONS
61
- invalid_parameter.
58
+ badExample: `INTERFACE lif.
59
+ METHODS load_data
60
+ EXCEPTIONS
61
+ invalid_parameter.
62
62
  ENDINTERFACE.`,
63
- goodExample: `INTERFACE lif.
64
- METHODS load_data
65
- RAISING
66
- cx_something.
63
+ goodExample: `INTERFACE lif.
64
+ METHODS load_data
65
+ RAISING
66
+ cx_something.
67
67
  ENDINTERFACE.`,
68
68
  };
69
69
  }
@@ -55,15 +55,15 @@ class UseLineExists extends _abap_rule_1.ABAPRule {
55
55
  key: "use_line_exists",
56
56
  title: "Use line_exists",
57
57
  shortDescription: `Use line_exists, from 740sp02 and up`,
58
- extendedInformation: `
59
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
60
-
58
+ extendedInformation: `
59
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
60
+
61
61
  Not reported if the READ TABLE statement contains BINARY SEARCH.`,
62
62
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
63
- badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
64
- IF sy-subrc = 0.
63
+ badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
64
+ IF sy-subrc = 0.
65
65
  ENDIF.`,
66
- goodExample: `IF line_exists( my_table[ key = 'A' ] ).
66
+ goodExample: `IF line_exists( my_table[ key = 'A' ] ).
67
67
  ENDIF.`,
68
68
  };
69
69
  }
@@ -56,10 +56,10 @@ class UseNew extends _abap_rule_1.ABAPRule {
56
56
  key: "use_new",
57
57
  title: "Use NEW",
58
58
  shortDescription: `Checks for deprecated CREATE OBJECT statements.`,
59
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
60
-
61
- If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
62
-
59
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
60
+
61
+ If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
62
+
63
63
  Applicable from v740sp02 and up`,
64
64
  badExample: `CREATE OBJECT ref.`,
65
65
  goodExample: `ref = NEW #( ).`,
@@ -54,13 +54,13 @@ class WhenOthersLast extends _abap_rule_1.ABAPRule {
54
54
  title: "WHEN OTHERS last",
55
55
  shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,
56
56
  tags: [_irule_1.RuleTag.SingleFile],
57
- badExample: `CASE bar.
58
- WHEN OTHERS.
59
- WHEN 2.
57
+ badExample: `CASE bar.
58
+ WHEN OTHERS.
59
+ WHEN 2.
60
60
  ENDCASE.`,
61
- goodExample: `CASE bar.
62
- WHEN 2.
63
- WHEN OTHERS.
61
+ goodExample: `CASE bar.
62
+ WHEN 2.
63
+ WHEN OTHERS.
64
64
  ENDCASE.`,
65
65
  };
66
66
  }
@@ -58,9 +58,9 @@ class XMLConsistency {
58
58
  key: "xml_consistency",
59
59
  title: "XML consistency",
60
60
  shortDescription: `Checks the consistency of main XML files`,
61
- extendedInformation: `Checks:
62
- * XML is well-formed and parseable
63
- * Naming for CLAS and INTF objects
61
+ extendedInformation: `Checks:
62
+ * XML is well-formed and parseable
63
+ * Naming for CLAS and INTF objects
64
64
  * Texts and translations do not exceed maximum allowed length.`,
65
65
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.Syntax],
66
66
  };
package/package.json CHANGED
@@ -1,72 +1,72 @@
1
- {
2
- "name": "@abaplint/core",
3
- "version": "2.120.0",
4
- "description": "abaplint - Core API",
5
- "main": "build/src/index.js",
6
- "typings": "build/abaplint.d.ts",
7
- "funding": "https://github.com/sponsors/larshp",
8
- "scripts": {
9
- "lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"",
10
- "lint:fix": "eslint \"src/**/*.ts\" \"test/**/*.ts\" --fix",
11
- "clean": "rm -rf build",
12
- "compile": "npm run clean && tsc && node scripts/version.js",
13
- "watch": "tsc --watch",
14
- "test": "npm run compile && mocha --timeout 1000 && npm run lint && npm run schema && api-extractor run",
15
- "test:only": "npm run compile && mocha --timeout 1000000",
16
- "test:parallel": "npm run compile && mocha --timeout 1000 --parallel --reporter dot",
17
- "coverage": "npm run compile && c8 mocha && c8 report --reporter=html",
18
- "lexer_performance": "tsc && curl -o lexer_performance.abap https://raw.githubusercontent.com/abapGit/build/main/zabapgit_standalone.prog.abap && node build/adhoc/lexer_performance.js",
19
- "parser_performance": "tsc && curl -o lexer_performance.abap https://raw.githubusercontent.com/abapGit/build/main/zabapgit_standalone.prog.abap && node build/adhoc/parser_performance.js",
20
- "syntax_performance": "tsc && curl -o lexer_performance.abap https://raw.githubusercontent.com/abapGit/build/main/zabapgit_standalone.prog.abap && node build/adhoc/syntax_performance.js",
21
- "typed_array": "tsc && node build/adhoc/typed_array.js",
22
- "schema": "node scripts/schema.js > scripts/schema.ts && ts-json-schema-generator --tsconfig tsconfig_schema.json --jsDoc extended --path scripts/schema.ts > scripts/schema.json && node scripts/schema_post.js",
23
- "publish:minor": "npm --no-git-tag-version version minor && npm install && npm run test && npm publish --access public",
24
- "publish:patch": "npm --no-git-tag-version version patch && npm install && npm run test && npm publish --access public"
25
- },
26
- "mocha": {
27
- "recursive": true,
28
- "reporter": "progress",
29
- "spec": "build/test/**/*.js",
30
- "require": "source-map-support/register"
31
- },
32
- "c8": {
33
- "include": [
34
- "build/src/**/*.js"
35
- ]
36
- },
37
- "repository": {
38
- "type": "git",
39
- "url": "git+https://github.com/abaplint/abaplint.git"
40
- },
41
- "engines": {
42
- "node": ">=18.0.0"
43
- },
44
- "keywords": [
45
- "ABAP",
46
- "lint"
47
- ],
48
- "author": "Lars Hvam Petersen",
49
- "license": "MIT",
50
- "bugs": {
51
- "url": "https://github.com/abaplint/abaplint/issues"
52
- },
53
- "homepage": "https://abaplint.org",
54
- "devDependencies": {
55
- "@microsoft/api-extractor": "^7.58.9",
56
- "@types/chai": "^4.3.20",
57
- "@types/mocha": "^10.0.10",
58
- "@types/node": "^24.13.2",
59
- "c8": "^11.0.0",
60
- "chai": "^4.5.0",
61
- "eslint": "^9.39.4",
62
- "mocha": "^11.7.6",
63
- "source-map-support": "^0.5.21",
64
- "ts-json-schema-generator": "^2.9.0",
65
- "typescript": "^6.0.3"
66
- },
67
- "dependencies": {
68
- "fast-xml-parser": "^5.9.3",
69
- "json5": "^2.2.3",
70
- "vscode-languageserver-types": "^3.18.0"
71
- }
72
- }
1
+ {
2
+ "name": "@abaplint/core",
3
+ "version": "2.120.1",
4
+ "description": "abaplint - Core API",
5
+ "main": "build/src/index.js",
6
+ "typings": "build/abaplint.d.ts",
7
+ "funding": "https://github.com/sponsors/larshp",
8
+ "scripts": {
9
+ "lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"",
10
+ "lint:fix": "eslint \"src/**/*.ts\" \"test/**/*.ts\" --fix",
11
+ "clean": "rm -rf build",
12
+ "compile": "npm run clean && tsc && node scripts/version.js",
13
+ "watch": "tsc --watch",
14
+ "test": "npm run compile && mocha --timeout 1000 && npm run lint && npm run schema && api-extractor run",
15
+ "test:only": "npm run compile && mocha --timeout 1000000",
16
+ "test:parallel": "npm run compile && mocha --timeout 1000 --parallel --reporter dot",
17
+ "coverage": "npm run compile && c8 mocha && c8 report --reporter=html",
18
+ "lexer_performance": "tsc && curl -o lexer_performance.abap https://raw.githubusercontent.com/abapGit/build/main/zabapgit_standalone.prog.abap && node build/adhoc/lexer_performance.js",
19
+ "parser_performance": "tsc && curl -o lexer_performance.abap https://raw.githubusercontent.com/abapGit/build/main/zabapgit_standalone.prog.abap && node build/adhoc/parser_performance.js",
20
+ "syntax_performance": "tsc && curl -o lexer_performance.abap https://raw.githubusercontent.com/abapGit/build/main/zabapgit_standalone.prog.abap && node build/adhoc/syntax_performance.js",
21
+ "typed_array": "tsc && node build/adhoc/typed_array.js",
22
+ "schema": "node scripts/schema.js > scripts/schema.ts && ts-json-schema-generator --tsconfig tsconfig_schema.json --jsDoc extended --path scripts/schema.ts > scripts/schema.json && node scripts/schema_post.js",
23
+ "publish:minor": "npm --no-git-tag-version version minor && npm install && npm run test && npm publish --access public",
24
+ "publish:patch": "npm --no-git-tag-version version patch && npm install && npm run test && npm publish --access public"
25
+ },
26
+ "mocha": {
27
+ "recursive": true,
28
+ "reporter": "progress",
29
+ "spec": "build/test/**/*.js",
30
+ "require": "source-map-support/register"
31
+ },
32
+ "c8": {
33
+ "include": [
34
+ "build/src/**/*.js"
35
+ ]
36
+ },
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "git+https://github.com/abaplint/abaplint.git"
40
+ },
41
+ "engines": {
42
+ "node": ">=18.0.0"
43
+ },
44
+ "keywords": [
45
+ "ABAP",
46
+ "lint"
47
+ ],
48
+ "author": "Lars Hvam Petersen",
49
+ "license": "MIT",
50
+ "bugs": {
51
+ "url": "https://github.com/abaplint/abaplint/issues"
52
+ },
53
+ "homepage": "https://abaplint.org",
54
+ "devDependencies": {
55
+ "@microsoft/api-extractor": "^7.58.9",
56
+ "@types/chai": "^4.3.20",
57
+ "@types/mocha": "^10.0.10",
58
+ "@types/node": "^24.13.2",
59
+ "c8": "^11.0.0",
60
+ "chai": "^4.5.0",
61
+ "eslint": "^9.39.4",
62
+ "mocha": "^11.7.6",
63
+ "source-map-support": "^0.5.21",
64
+ "ts-json-schema-generator": "^2.9.0",
65
+ "typescript": "^6.0.3"
66
+ },
67
+ "dependencies": {
68
+ "fast-xml-parser": "^5.9.3",
69
+ "json5": "^2.2.3",
70
+ "vscode-languageserver-types": "^3.18.0"
71
+ }
72
+ }