@abaplint/core 2.113.70 → 2.113.72

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 (127) hide show
  1. package/README.md +6 -6
  2. package/build/abaplint.d.ts +12 -2
  3. package/build/src/abap/2_statements/expressions/data_definition.js +3 -1
  4. package/build/src/abap/2_statements/expressions/string_template_formatting.js +1 -1
  5. package/build/src/abap/2_statements/statement_parser.js +6 -2
  6. package/build/src/abap/2_statements/statements/get_property.js +1 -1
  7. package/build/src/abap/2_statements/statements/modify_entities.js +5 -3
  8. package/build/src/abap/2_statements/statements/modify_line.js +2 -1
  9. package/build/src/abap/2_statements/statements/read_entities.js +2 -1
  10. package/build/src/abap/2_statements/statements/system_call.js +1 -1
  11. package/build/src/abap/5_syntax/expressions/loop_group_by.js +4 -0
  12. package/build/src/abap/5_syntax/statements/delete_memory.js +14 -0
  13. package/build/src/abap/5_syntax/syntax.js +2 -0
  14. package/build/src/abap/flow/flow_graph.js +7 -7
  15. package/build/src/abap/flow/statement_flow.js +1 -0
  16. package/build/src/ddic.js +3 -1
  17. package/build/src/lsp/help.js +10 -10
  18. package/build/src/objects/cds_type.js +21 -0
  19. package/build/src/objects/index.js +1 -0
  20. package/build/src/registry.js +1 -1
  21. package/build/src/rules/7bit_ascii.js +4 -4
  22. package/build/src/rules/abapdoc.js +4 -4
  23. package/build/src/rules/add_test_attributes.js +20 -20
  24. package/build/src/rules/align_parameters.js +40 -40
  25. package/build/src/rules/align_type_expressions.js +28 -28
  26. package/build/src/rules/ambiguous_statement.js +7 -7
  27. package/build/src/rules/avoid_use.js +10 -10
  28. package/build/src/rules/begin_end_names.js +4 -4
  29. package/build/src/rules/begin_single_include.js +13 -13
  30. package/build/src/rules/call_transaction_authority_check.js +3 -3
  31. package/build/src/rules/cds_comment_style.js +4 -4
  32. package/build/src/rules/cds_legacy_view.js +4 -4
  33. package/build/src/rules/chain_mainly_declarations.js +4 -4
  34. package/build/src/rules/change_if_to_case.js +8 -8
  35. package/build/src/rules/check_abstract.js +2 -2
  36. package/build/src/rules/check_comments.js +4 -4
  37. package/build/src/rules/check_include.js +3 -3
  38. package/build/src/rules/check_subrc.js +8 -8
  39. package/build/src/rules/classic_exceptions_overlap.js +10 -10
  40. package/build/src/rules/commented_code.js +1 -1
  41. package/build/src/rules/constructor_visibility_public.js +4 -4
  42. package/build/src/rules/contains_tab.js +2 -2
  43. package/build/src/rules/cyclic_oo.js +4 -4
  44. package/build/src/rules/dangerous_statement.js +1 -1
  45. package/build/src/rules/definitions_top.js +6 -6
  46. package/build/src/rules/downport.js +82 -82
  47. package/build/src/rules/easy_to_find_messages.js +6 -6
  48. package/build/src/rules/empty_event.js +6 -6
  49. package/build/src/rules/empty_line_in_statement.js +2 -2
  50. package/build/src/rules/empty_structure.js +6 -6
  51. package/build/src/rules/exit_or_check.js +3 -3
  52. package/build/src/rules/expand_macros.js +5 -5
  53. package/build/src/rules/exporting.js +1 -1
  54. package/build/src/rules/forbidden_identifier.js +1 -1
  55. package/build/src/rules/forbidden_void_type.js +2 -2
  56. package/build/src/rules/fully_type_itabs.js +2 -2
  57. package/build/src/rules/functional_writing.js +17 -17
  58. package/build/src/rules/global_class.js +8 -8
  59. package/build/src/rules/identical_conditions.js +12 -12
  60. package/build/src/rules/identical_contents.js +14 -14
  61. package/build/src/rules/identical_descriptions.js +6 -6
  62. package/build/src/rules/if_in_if.js +35 -35
  63. package/build/src/rules/implement_methods.js +3 -3
  64. package/build/src/rules/implicit_start_of_selection.js +5 -5
  65. package/build/src/rules/in_statement_indentation.js +14 -12
  66. package/build/src/rules/indentation.js +16 -16
  67. package/build/src/rules/intf_referencing_clas.js +3 -3
  68. package/build/src/rules/invalid_table_index.js +2 -2
  69. package/build/src/rules/line_break_style.js +2 -2
  70. package/build/src/rules/line_length.js +1 -1
  71. package/build/src/rules/line_only_punc.js +1 -1
  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/mix_returning.js +6 -6
  81. package/build/src/rules/nesting.js +1 -1
  82. package/build/src/rules/no_chained_assignment.js +1 -1
  83. package/build/src/rules/no_external_form_calls.js +2 -2
  84. package/build/src/rules/no_inline_in_optional_branches.js +11 -11
  85. package/build/src/rules/no_prefixes.js +6 -6
  86. package/build/src/rules/no_public_attributes.js +1 -1
  87. package/build/src/rules/no_yoda_conditions.js +4 -4
  88. package/build/src/rules/nrob_consistency.js +2 -2
  89. package/build/src/rules/obsolete_statement.js +51 -51
  90. package/build/src/rules/omit_parameter_name.js +3 -3
  91. package/build/src/rules/omit_receiving.js +13 -13
  92. package/build/src/rules/parser_702_chaining.js +2 -2
  93. package/build/src/rules/parser_error.js +2 -2
  94. package/build/src/rules/parser_missing_space.js +1 -1
  95. package/build/src/rules/prefer_inline.js +16 -16
  96. package/build/src/rules/prefer_is_not.js +9 -9
  97. package/build/src/rules/prefer_raise_exception_new.js +5 -5
  98. package/build/src/rules/prefer_returning_to_exporting.js +4 -4
  99. package/build/src/rules/prefer_xsdbool.js +2 -2
  100. package/build/src/rules/preferred_compare_operator.js +2 -2
  101. package/build/src/rules/reduce_procedural_code.js +17 -17
  102. package/build/src/rules/remove_descriptions.js +4 -4
  103. package/build/src/rules/rfc_error_handling.js +7 -7
  104. package/build/src/rules/select_add_order_by.js +5 -5
  105. package/build/src/rules/select_performance.js +5 -5
  106. package/build/src/rules/select_single_full_key.js +2 -2
  107. package/build/src/rules/sicf_consistency.js +2 -2
  108. package/build/src/rules/slow_parameter_passing.js +16 -16
  109. package/build/src/rules/space_before_dot.js +2 -2
  110. package/build/src/rules/sql_value_conversion.js +6 -6
  111. package/build/src/rules/start_at_tab.js +1 -1
  112. package/build/src/rules/strict_sql.js +6 -6
  113. package/build/src/rules/sy_modification.js +3 -3
  114. package/build/src/rules/tabl_enhancement_category.js +2 -2
  115. package/build/src/rules/tables_declared_locally.js +2 -2
  116. package/build/src/rules/type_form_parameters.js +2 -2
  117. package/build/src/rules/unnecessary_pragma.js +29 -29
  118. package/build/src/rules/unnecessary_return.js +11 -11
  119. package/build/src/rules/unused_macros.js +6 -6
  120. package/build/src/rules/unused_methods.js +12 -12
  121. package/build/src/rules/unused_variables.js +12 -12
  122. package/build/src/rules/use_bool_expression.js +8 -8
  123. package/build/src/rules/use_class_based_exceptions.js +8 -8
  124. package/build/src/rules/use_line_exists.js +6 -6
  125. package/build/src/rules/use_new.js +4 -4
  126. package/build/src/rules/when_others_last.js +6 -6
  127. package/package.json +70 -70
@@ -21,14 +21,14 @@ class MaxOneMethodParameterPerLine extends _abap_rule_1.ABAPRule {
21
21
  title: "Max one method parameter definition per line",
22
22
  shortDescription: `Keep max one method parameter description per line`,
23
23
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],
24
- badExample: `
25
- METHODS apps_scope_token
26
- IMPORTING
24
+ badExample: `
25
+ METHODS apps_scope_token
26
+ IMPORTING
27
27
  body TYPE bodyapps_scope_token client_id TYPE str.`,
28
- goodExample: `
29
- METHODS apps_scope_token
30
- IMPORTING
31
- body TYPE bodyapps_scope_token
28
+ goodExample: `
29
+ METHODS apps_scope_token
30
+ IMPORTING
31
+ body TYPE bodyapps_scope_token
32
32
  client_id TYPE str.`,
33
33
  };
34
34
  }
@@ -21,11 +21,11 @@ class MaxOneStatement extends _abap_rule_1.ABAPRule {
21
21
  key: "max_one_statement",
22
22
  title: "Max one statement per line",
23
23
  shortDescription: `Checks that each line contains only a single statement.`,
24
- extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
25
-
26
- Does not report anything for chained statements.
27
-
28
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
24
+ extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
25
+
26
+ Does not report anything for chained statements.
27
+
28
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
29
29
  https://docs.abapopenchecks.org/checks/11/`,
30
30
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
31
31
  badExample: `WRITE foo. WRITE bar.`,
@@ -35,8 +35,8 @@ class MethodLength {
35
35
  key: "method_length",
36
36
  title: "Method/Form Length",
37
37
  shortDescription: `Checks relating to method/form length.`,
38
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
39
-
38
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
39
+
40
40
  Abstract methods without statements are considered okay.`,
41
41
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
42
42
  };
@@ -19,20 +19,20 @@ class MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {
19
19
  key: "method_overwrites_builtin",
20
20
  title: "Method name overwrites builtin function",
21
21
  shortDescription: `Checks Method names that overwrite builtin SAP functions`,
22
- extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
23
-
24
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
25
-
22
+ extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
23
+
24
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
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.
28
+ badExample: `CLASS lcl DEFINITION.
29
+ PUBLIC SECTION.
30
+ METHODS matches.
31
+ ENDCLASS.
32
+
33
+ CLASS lcl IMPLEMENTATION.
34
+ METHOD matches.
35
+ ENDMETHOD.
36
36
  ENDCLASS.`,
37
37
  };
38
38
  }
@@ -23,12 +23,12 @@ 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.
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
32
  ENDCLASS.`,
33
33
  };
34
34
  }
@@ -24,7 +24,7 @@ class Nesting extends _abap_rule_1.ABAPRule {
24
24
  key: "nesting",
25
25
  title: "Check nesting depth",
26
26
  shortDescription: `Checks for methods exceeding a maximum nesting depth`,
27
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
27
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
28
28
  https://docs.abapopenchecks.org/checks/74/`,
29
29
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
30
30
  };
@@ -23,7 +23,7 @@ class NoChainedAssignment extends _abap_rule_1.ABAPRule {
23
23
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,
24
24
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
25
25
  badExample: `var1 = var2 = var3.`,
26
- goodExample: `var2 = var3.
26
+ goodExample: `var2 = var3.
27
27
  var1 = var2.`,
28
28
  };
29
29
  }
@@ -20,8 +20,8 @@ class NoExternalFormCalls extends _abap_rule_1.ABAPRule {
20
20
  key: "no_external_form_calls",
21
21
  title: "No external FORM calls",
22
22
  shortDescription: `Detect external form calls`,
23
- badExample: `PERFORM foo IN PROGRAM bar.
24
-
23
+ badExample: `PERFORM foo IN PROGRAM bar.
24
+
25
25
  PERFORM foo(bar).`,
26
26
  tags: [_irule_1.RuleTag.SingleFile],
27
27
  };
@@ -21,17 +21,17 @@ class NoInlineInOptionalBranches extends _abap_rule_1.ABAPRule {
21
21
  key: "no_inline_in_optional_branches",
22
22
  title: "Don't declare inline in optional branches",
23
23
  shortDescription: `Don't declare inline in optional branches`,
24
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
25
-
26
- Considered optional branches:
27
- * inside IF/ELSEIF/ELSE
28
- * inside LOOP
29
- * inside WHILE
30
- * inside CASE/WHEN, CASE TYPE OF
31
- * inside DO
32
- * inside SELECT loops
33
-
34
- Not considered optional branches:
24
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
25
+
26
+ Considered optional branches:
27
+ * inside IF/ELSEIF/ELSE
28
+ * inside LOOP
29
+ * inside WHILE
30
+ * inside CASE/WHEN, CASE TYPE OF
31
+ * inside DO
32
+ * inside SELECT loops
33
+
34
+ Not considered optional branches:
35
35
  * TRY/CATCH/CLEANUP`,
36
36
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
37
37
  };
@@ -43,12 +43,12 @@ class NoPrefixes extends _abap_rule_1.ABAPRule {
43
43
  key: "no_prefixes",
44
44
  title: "No Prefixes",
45
45
  shortDescription: `Dont use hungarian notation`,
46
- extendedInformation: `
47
- Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
48
- allowing all types to become voided, abaplint will then provide less precise syntax errors.
49
-
50
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
51
-
46
+ extendedInformation: `
47
+ Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
48
+ allowing all types to become voided, abaplint will then provide less precise syntax errors.
49
+
50
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
51
+
52
52
  https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodings.md`,
53
53
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
54
54
  badExample: `DATA lv_foo TYPE i.`,
@@ -27,7 +27,7 @@ class NoPublicAttributes extends _abap_rule_1.ABAPRule {
27
27
  return {
28
28
  key: "no_public_attributes",
29
29
  title: "No public attributes",
30
- shortDescription: `Checks that classes and interfaces don't contain any public attributes.
30
+ shortDescription: `Checks that classes and interfaces don't contain any public attributes.
31
31
  Exceptions are excluded from this rule.`,
32
32
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,
33
33
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
@@ -24,13 +24,13 @@ class NoYodaConditions extends _abap_rule_1.ABAPRule {
24
24
  key: "no_yoda_conditions",
25
25
  title: "No Yoda conditions",
26
26
  shortDescription: `Finds Yoda conditions and reports issues`,
27
- extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
28
-
27
+ extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
28
+
29
29
  Conditions with operators CP, NP, CS, NS, CA, NA, CO, CN are ignored`,
30
30
  tags: [_irule_1.RuleTag.SingleFile],
31
- badExample: `IF 0 <> sy-subrc.
31
+ badExample: `IF 0 <> sy-subrc.
32
32
  ENDIF.`,
33
- goodExample: `IF sy-subrc <> 0.
33
+ goodExample: `IF sy-subrc <> 0.
34
34
  ENDIF.`,
35
35
  };
36
36
  }
@@ -17,8 +17,8 @@ class NROBConsistency {
17
17
  key: "nrob_consistency",
18
18
  title: "Number range consistency",
19
19
  shortDescription: `Consistency checks for number ranges`,
20
- extendedInformation: `Issue reported if percentage warning is over 50%
21
-
20
+ extendedInformation: `Issue reported if percentage warning is over 50%
21
+
22
22
  Issue reported if the referenced domain is not found(taking error namespace into account)`,
23
23
  tags: [_irule_1.RuleTag.SingleFile],
24
24
  };
@@ -85,58 +85,58 @@ class ObsoleteStatement extends _abap_rule_1.ABAPRule {
85
85
  title: "Obsolete statements",
86
86
  shortDescription: `Checks for usages of certain obsolete statements`,
87
87
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
88
- extendedInformation: `
89
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
90
-
91
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
92
-
93
- SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
94
-
95
- IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
96
-
97
- WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
98
-
99
- FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
100
-
101
- TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
102
-
103
- LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
104
-
105
- COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
106
-
107
- OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
108
-
109
- PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
110
-
111
- RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
112
-
113
- PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
114
-
115
- MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
116
-
117
- SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
118
- SELECT COUNT(*) is considered okay
119
-
120
- FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
121
-
122
- SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
123
-
124
- CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
125
-
126
- POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
127
-
128
- OCCURENCES: check for OCCURENCES vs OCCURRENCES
129
-
88
+ extendedInformation: `
89
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
90
+
91
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
92
+
93
+ SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
94
+
95
+ IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
96
+
97
+ WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
98
+
99
+ FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
100
+
101
+ TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
102
+
103
+ LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
104
+
105
+ COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
106
+
107
+ OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
108
+
109
+ PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
110
+
111
+ RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
112
+
113
+ PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
114
+
115
+ MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
116
+
117
+ SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
118
+ SELECT COUNT(*) is considered okay
119
+
120
+ FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
121
+
122
+ SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
123
+
124
+ CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
125
+
126
+ POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
127
+
128
+ OCCURENCES: check for OCCURENCES vs OCCURRENCES
129
+
130
130
  CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapselect_client_obsolete.htm`,
131
- badExample: `REFRESH itab.
132
-
133
- COMPUTE foo = 2 + 2.
134
-
135
- MULTIPLY lv_foo BY 2.
136
-
137
- INTERFACE intf LOAD.
138
-
139
- IF foo IS SUPPLIED.
131
+ badExample: `REFRESH itab.
132
+
133
+ COMPUTE foo = 2 + 2.
134
+
135
+ MULTIPLY lv_foo BY 2.
136
+
137
+ INTERFACE intf LOAD.
138
+
139
+ IF foo IS SUPPLIED.
140
140
  ENDIF.`,
141
141
  };
142
142
  }
@@ -23,9 +23,9 @@ class OmitParameterName {
23
23
  key: "omit_parameter_name",
24
24
  title: "Omit parameter name",
25
25
  shortDescription: `Omit the parameter name in single parameter calls`,
26
- extendedInformation: `
27
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
28
-
26
+ extendedInformation: `
27
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
28
+
29
29
  EXPORTING must already be omitted for this rule to take effect, https://rules.abaplint.org/exporting/`,
30
30
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
31
31
  badExample: `method( param = 2 ).`,
@@ -21,20 +21,20 @@ class OmitReceiving extends _abap_rule_1.ABAPRule {
21
21
  shortDescription: `Omit RECEIVING`,
22
22
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-receiving`,
23
23
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
24
- badExample: `
25
- upload_pack(
26
- EXPORTING
27
- io_client = lo_client
28
- iv_url = iv_url
29
- iv_deepen_level = iv_deepen_level
30
- it_hashes = lt_hashes
31
- RECEIVING
24
+ badExample: `
25
+ upload_pack(
26
+ EXPORTING
27
+ io_client = lo_client
28
+ iv_url = iv_url
29
+ iv_deepen_level = iv_deepen_level
30
+ it_hashes = lt_hashes
31
+ RECEIVING
32
32
  rt_objects = et_objects ).`,
33
- goodExample: `
34
- et_objects = upload_pack(
35
- io_client = lo_client
36
- iv_url = iv_url
37
- iv_deepen_level = iv_deepen_level
33
+ goodExample: `
34
+ et_objects = upload_pack(
35
+ io_client = lo_client
36
+ iv_url = iv_url
37
+ iv_deepen_level = iv_deepen_level
38
38
  it_hashes = lt_hashes ).`,
39
39
  };
40
40
  }
@@ -19,8 +19,8 @@ class Parser702Chaining extends _abap_rule_1.ABAPRule {
19
19
  return {
20
20
  key: "parser_702_chaining",
21
21
  title: "Parser Error, bad chanining on 702",
22
- shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
23
- this rule finds these and reports errors.
22
+ shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
23
+ this rule finds these and reports errors.
24
24
  Only active on target version 702 and below.`,
25
25
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
26
26
  };
@@ -19,8 +19,8 @@ class ParserError {
19
19
  return {
20
20
  key: "parser_error",
21
21
  title: "Parser error",
22
- shortDescription: `Checks for syntax not recognized by abaplint.
23
-
22
+ shortDescription: `Checks for syntax not recognized by abaplint.
23
+
24
24
  See recognized syntax at https://syntax.abaplint.org`,
25
25
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
26
26
  };
@@ -21,7 +21,7 @@ class ParserMissingSpace extends _abap_rule_1.ABAPRule {
21
21
  return {
22
22
  key: "parser_missing_space",
23
23
  title: "Parser Error, missing space",
24
- shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
24
+ shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
25
25
  This rule makes sure the spaces are consistently required across the language.`,
26
26
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
27
27
  badExample: `IF ( foo = 'bar').`,
@@ -23,25 +23,25 @@ class PreferInline {
23
23
  key: "prefer_inline",
24
24
  title: "Prefer Inline Declarations",
25
25
  shortDescription: `Prefer inline to up-front declarations.`,
26
- extendedInformation: `EXPERIMENTAL
27
-
28
- Activates if language version is v740sp02 or above.
29
-
30
- Variables must be local(METHOD or FORM).
31
-
32
- No generic or void typed variables. No syntax errors.
33
-
34
- First position used must be a full/pure write.
35
-
36
- Move statment is not a cast(?=)
37
-
26
+ extendedInformation: `EXPERIMENTAL
27
+
28
+ Activates if language version is v740sp02 or above.
29
+
30
+ Variables must be local(METHOD or FORM).
31
+
32
+ No generic or void typed variables. No syntax errors.
33
+
34
+ First position used must be a full/pure write.
35
+
36
+ Move statment is not a cast(?=)
37
+
38
38
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-inline-to-up-front-declarations`,
39
39
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Experimental, _irule_1.RuleTag.Quickfix],
40
- badExample: `DATA foo TYPE i.
41
- foo = 2.
42
- DATA percentage TYPE decfloat34.
40
+ badExample: `DATA foo TYPE i.
41
+ foo = 2.
42
+ DATA percentage TYPE decfloat34.
43
43
  percentage = ( comment_number / abs_statement_number ) * 100.`,
44
- goodExample: `DATA(foo) = 2.
44
+ goodExample: `DATA(foo) = 2.
45
45
  DATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 100.`,
46
46
  };
47
47
  }
@@ -21,18 +21,18 @@ class PreferIsNot extends _abap_rule_1.ABAPRule {
21
21
  key: "prefer_is_not",
22
22
  title: "Prefer IS NOT to NOT IS",
23
23
  shortDescription: `Prefer IS NOT to NOT IS`,
24
- extendedInformation: `
25
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
26
-
24
+ extendedInformation: `
25
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
26
+
27
27
  "if not is_valid( )." examples are skipped`,
28
28
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
29
- goodExample: `IF variable IS NOT INITIAL.
30
- IF variable NP 'TODO*'.
31
- IF variable <> 42.
29
+ goodExample: `IF variable IS NOT INITIAL.
30
+ IF variable NP 'TODO*'.
31
+ IF variable <> 42.
32
32
  IF variable CO 'hello'.`,
33
- badExample: `IF NOT variable IS INITIAL.
34
- IF NOT variable CP 'TODO*'.
35
- IF NOT variable = 42.
33
+ badExample: `IF NOT variable IS INITIAL.
34
+ IF NOT variable CP 'TODO*'.
35
+ IF NOT variable = 42.
36
36
  IF NOT variable CA 'hello'.`,
37
37
  };
38
38
  }
@@ -20,14 +20,14 @@ class PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {
20
20
  key: "prefer_raise_exception_new",
21
21
  title: "Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE",
22
22
  shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,
23
- extendedInformation: `
24
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
25
-
23
+ extendedInformation: `
24
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
25
+
26
26
  From 752 and up`,
27
27
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
28
28
  goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,
29
- badExample: `RAISE EXCEPTION TYPE cx_generation_error
30
- EXPORTING
29
+ badExample: `RAISE EXCEPTION TYPE cx_generation_error
30
+ EXPORTING
31
31
  previous = exception.`,
32
32
  };
33
33
  }
@@ -20,12 +20,12 @@ class PreferReturningToExporting extends _abap_rule_1.ABAPRule {
20
20
  key: "prefer_returning_to_exporting",
21
21
  title: "Prefer RETURNING to EXPORTING",
22
22
  shortDescription: `Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.`,
23
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
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.
26
+ badExample: `CLASS lcl DEFINITION.
27
+ PUBLIC SECTION.
28
+ METHODS test EXPORTING ev_foo TYPE i.
29
29
  ENDCLASS.`,
30
30
  };
31
31
  }
@@ -21,8 +21,8 @@ class PreferXsdbool extends _abap_rule_1.ABAPRule {
21
21
  key: "prefer_xsdbool",
22
22
  title: "Prefer xsdbool over boolc",
23
23
  shortDescription: `Prefer xsdbool over boolc`,
24
- extendedInformation: `Activates if language version is v740sp08 or above.
25
-
24
+ extendedInformation: `Activates if language version is v740sp08 or above.
25
+
26
26
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
27
27
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
28
28
  badExample: `DATA(sdf) = boolc( 1 = 2 ).`,
@@ -27,9 +27,9 @@ 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.
30
+ badExample: `IF foo EQ bar.
31
31
  ENDIF.`,
32
- goodExample: `IF foo = bar.
32
+ goodExample: `IF foo = bar.
33
33
  ENDIF.`,
34
34
  };
35
35
  }
@@ -24,26 +24,26 @@ class ReduceProceduralCode extends _abap_rule_1.ABAPRule {
24
24
  key: "reduce_procedural_code",
25
25
  title: "Reduce procedural code",
26
26
  shortDescription: `Checks FORM and FUNCTION-MODULE have few statements`,
27
- extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
28
-
29
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
30
-
27
+ extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
28
+
29
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
30
+
31
31
  Comments are not counted as statements.`,
32
32
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
33
- badExample: `FORM foo.
34
- DATA lv_bar TYPE i.
35
- lv_bar = 2 + 2.
36
- IF lv_bar = 4.
37
- WRITE 'hello world'.
38
- ENDIF.
39
- DATA lv_bar TYPE i.
40
- lv_bar = 2 + 2.
41
- IF lv_bar = 4.
42
- WRITE 'hello world'.
43
- ENDIF.
33
+ badExample: `FORM foo.
34
+ DATA lv_bar TYPE i.
35
+ lv_bar = 2 + 2.
36
+ IF lv_bar = 4.
37
+ WRITE 'hello world'.
38
+ ENDIF.
39
+ DATA lv_bar TYPE i.
40
+ lv_bar = 2 + 2.
41
+ IF lv_bar = 4.
42
+ WRITE 'hello world'.
43
+ ENDIF.
44
44
  ENDFORM.`,
45
- goodExample: `FORM foo.
46
- NEW zcl_global_class( )->run_logic( ).
45
+ goodExample: `FORM foo.
46
+ NEW zcl_global_class( )->run_logic( ).
47
47
  ENDFORM.`,
48
48
  };
49
49
  }
@@ -26,10 +26,10 @@ class RemoveDescriptions {
26
26
  return {
27
27
  key: "remove_descriptions",
28
28
  title: "Remove descriptions",
29
- shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
30
-
31
- Class descriptions are required, see rule description_empty.
32
-
29
+ shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
30
+
31
+ Class descriptions are required, see rule description_empty.
32
+
33
33
  Consider using ABAP Doc for documentation.`,
34
34
  tags: [],
35
35
  };