@abaplint/core 2.119.66 → 2.120.0

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 (138) hide show
  1. package/README.md +6 -6
  2. package/build/abaplint.d.ts +2 -2
  3. package/build/src/abap/5_syntax/_current_scope.js +1 -1
  4. package/build/src/abap/5_syntax/expressions/_check_offset_length.js +59 -0
  5. package/build/src/abap/5_syntax/expressions/method_call_param.js +4 -0
  6. package/build/src/abap/5_syntax/expressions/method_parameters.js +20 -6
  7. package/build/src/abap/5_syntax/statements/catch.js +17 -1
  8. package/build/src/config.js +1 -1
  9. package/build/src/lsp/help.js +10 -10
  10. package/build/src/registry.js +1 -1
  11. package/build/src/rules/7bit_ascii.js +4 -4
  12. package/build/src/rules/abapdoc.js +4 -4
  13. package/build/src/rules/add_test_attributes.js +20 -20
  14. package/build/src/rules/align_parameters.js +40 -40
  15. package/build/src/rules/align_type_expressions.js +28 -28
  16. package/build/src/rules/ambiguous_statement.js +7 -7
  17. package/build/src/rules/avoid_use.js +10 -10
  18. package/build/src/rules/begin_end_names.js +4 -4
  19. package/build/src/rules/begin_single_include.js +13 -13
  20. package/build/src/rules/call_transaction_authority_check.js +3 -3
  21. package/build/src/rules/cds_association_name.js +6 -6
  22. package/build/src/rules/cds_comment_style.js +4 -4
  23. package/build/src/rules/cds_field_order.js +12 -12
  24. package/build/src/rules/cds_legacy_view.js +4 -4
  25. package/build/src/rules/cds_naming.js +7 -7
  26. package/build/src/rules/chain_mainly_declarations.js +4 -4
  27. package/build/src/rules/change_if_to_case.js +8 -8
  28. package/build/src/rules/check_abstract.js +2 -2
  29. package/build/src/rules/check_comments.js +4 -4
  30. package/build/src/rules/check_include.js +4 -4
  31. package/build/src/rules/check_subrc.js +8 -8
  32. package/build/src/rules/class_attribute_names.js +6 -6
  33. package/build/src/rules/classic_exceptions_overlap.js +10 -10
  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 +92 -92
  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/inline_data_old_versions.js +1 -1
  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 +2 -2
  71. package/build/src/rules/line_only_punc.js +1 -1
  72. package/build/src/rules/local_class_naming.js +2 -2
  73. package/build/src/rules/local_variable_names.js +6 -6
  74. package/build/src/rules/macro_naming.js +2 -2
  75. package/build/src/rules/main_file_contents.js +4 -4
  76. package/build/src/rules/many_parentheses.js +10 -10
  77. package/build/src/rules/max_one_method_parameter_per_line.js +7 -7
  78. package/build/src/rules/max_one_statement.js +5 -5
  79. package/build/src/rules/method_length.js +2 -2
  80. package/build/src/rules/method_overwrites_builtin.js +12 -12
  81. package/build/src/rules/method_parameter_names.js +4 -4
  82. package/build/src/rules/mix_returning.js +8 -8
  83. package/build/src/rules/nesting.js +1 -1
  84. package/build/src/rules/no_aliases.js +5 -5
  85. package/build/src/rules/no_chained_assignment.js +1 -1
  86. package/build/src/rules/no_comments_between_methods.js +12 -12
  87. package/build/src/rules/no_external_form_calls.js +2 -2
  88. package/build/src/rules/no_inline_in_optional_branches.js +12 -12
  89. package/build/src/rules/no_macros.js +4 -4
  90. package/build/src/rules/no_prefixes.js +6 -6
  91. package/build/src/rules/no_public_attributes.js +7 -7
  92. package/build/src/rules/no_yoda_conditions.js +4 -4
  93. package/build/src/rules/nrob_consistency.js +2 -2
  94. package/build/src/rules/obsolete_statement.js +51 -51
  95. package/build/src/rules/omit_parameter_name.js +3 -3
  96. package/build/src/rules/omit_receiving.js +13 -13
  97. package/build/src/rules/parser_702_chaining.js +2 -2
  98. package/build/src/rules/parser_error.js +2 -2
  99. package/build/src/rules/parser_missing_space.js +1 -1
  100. package/build/src/rules/prefer_inline.js +16 -16
  101. package/build/src/rules/prefer_is_not.js +9 -9
  102. package/build/src/rules/prefer_raise_exception_new.js +5 -5
  103. package/build/src/rules/prefer_returning_to_exporting.js +4 -4
  104. package/build/src/rules/prefer_xsdbool.js +2 -2
  105. package/build/src/rules/preferred_compare_operator.js +2 -2
  106. package/build/src/rules/prefix_is_current_class.js +6 -6
  107. package/build/src/rules/reduce_procedural_code.js +17 -17
  108. package/build/src/rules/redundant_conversion.js +253 -0
  109. package/build/src/rules/remove_descriptions.js +4 -4
  110. package/build/src/rules/rfc_error_handling.js +7 -7
  111. package/build/src/rules/select_add_order_by.js +5 -5
  112. package/build/src/rules/select_performance.js +5 -5
  113. package/build/src/rules/select_single_full_key.js +2 -2
  114. package/build/src/rules/selection_screen_texts_missing.js +2 -2
  115. package/build/src/rules/sicf_consistency.js +2 -2
  116. package/build/src/rules/slow_parameter_passing.js +16 -16
  117. package/build/src/rules/space_before_dot.js +2 -2
  118. package/build/src/rules/sql_escape_host_variables.js +1 -1
  119. package/build/src/rules/sql_value_conversion.js +6 -6
  120. package/build/src/rules/start_at_tab.js +1 -1
  121. package/build/src/rules/static_call_via_instance.js +4 -4
  122. package/build/src/rules/strict_sql.js +6 -6
  123. package/build/src/rules/sy_modification.js +6 -6
  124. package/build/src/rules/tabl_enhancement_category.js +2 -2
  125. package/build/src/rules/tables_declared_locally.js +2 -2
  126. package/build/src/rules/type_form_parameters.js +2 -2
  127. package/build/src/rules/unnecessary_pragma.js +29 -29
  128. package/build/src/rules/unnecessary_return.js +11 -11
  129. package/build/src/rules/unused_macros.js +6 -6
  130. package/build/src/rules/unused_methods.js +12 -12
  131. package/build/src/rules/unused_variables.js +12 -12
  132. package/build/src/rules/use_bool_expression.js +8 -8
  133. package/build/src/rules/use_class_based_exceptions.js +8 -8
  134. package/build/src/rules/use_line_exists.js +7 -7
  135. package/build/src/rules/use_new.js +4 -4
  136. package/build/src/rules/when_others_last.js +6 -6
  137. package/build/src/rules/xml_consistency.js +3 -3
  138. package/package.json +72 -72
@@ -18,15 +18,15 @@ class CDSAssociationName {
18
18
  key: "cds_association_name",
19
19
  title: "CDS Association Name",
20
20
  shortDescription: `CDS association names should start with an underscore`,
21
- extendedInformation: `By convention, CDS association names must start with an underscore character.
22
-
21
+ extendedInformation: `By convention, CDS association names must start with an underscore character.
22
+
23
23
  https://help.sap.com/docs/abap-cloud/abap-data-models/cds-associations`,
24
24
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Naming],
25
- badExample: `define view entity test as select from source
26
- association [1..1] to target as Assoc on Assoc.id = source.id
25
+ badExample: `define view entity test as select from source
26
+ association [1..1] to target as Assoc on Assoc.id = source.id
27
27
  { key id }`,
28
- goodExample: `define view entity test as select from source
29
- association [1..1] to target as _Assoc on _Assoc.id = source.id
28
+ goodExample: `define view entity test as select from source
29
+ association [1..1] to target as _Assoc on _Assoc.id = source.id
30
30
  { key id }`,
31
31
  };
32
32
  }
@@ -19,10 +19,10 @@ class CDSCommentStyle {
19
19
  key: "cds_comment_style",
20
20
  title: "CDS Comment Style",
21
21
  shortDescription: `Check for obsolete comment style`,
22
- extendedInformation: `Check for obsolete comment style
23
-
24
- Comments starting with "--" are considered obsolete
25
-
22
+ extendedInformation: `Check for obsolete comment style
23
+
24
+ Comments starting with "--" are considered obsolete
25
+
26
26
  https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abencds_general_syntax_rules.htm`,
27
27
  tags: [_irule_1.RuleTag.SingleFile],
28
28
  badExample: "-- this is a comment",
@@ -19,19 +19,19 @@ class CDSFieldOrder {
19
19
  title: "CDS Field Order",
20
20
  shortDescription: `Checks that CDS key fields are listed first and associations last in the field list`,
21
21
  tags: [_irule_1.RuleTag.SingleFile],
22
- badExample: `define view entity test as select from source
23
- association [1..1] to target as _Assoc on _Assoc.id = source.id
24
- {
25
- field1,
26
- key id,
27
- _Assoc
22
+ badExample: `define view entity test as select from source
23
+ association [1..1] to target as _Assoc on _Assoc.id = source.id
24
+ {
25
+ field1,
26
+ key id,
27
+ _Assoc
28
28
  }`,
29
- goodExample: `define view entity test as select from source
30
- association [1..1] to target as _Assoc on _Assoc.id = source.id
31
- {
32
- key id,
33
- field1,
34
- _Assoc
29
+ goodExample: `define view entity test as select from source
30
+ association [1..1] to target as _Assoc on _Assoc.id = source.id
31
+ {
32
+ key id,
33
+ field1,
34
+ _Assoc
35
35
  }`,
36
36
  };
37
37
  }
@@ -19,10 +19,10 @@ class CDSLegacyView {
19
19
  key: "cds_legacy_view",
20
20
  title: "CDS Legacy View",
21
21
  shortDescription: `Identify CDS Legacy Views`,
22
- extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
23
-
24
- https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
25
-
22
+ extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
23
+
24
+ https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
25
+
26
26
  v755 and up`,
27
27
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Upport],
28
28
  };
@@ -44,13 +44,13 @@ class CDSNaming {
44
44
  key: "cds_naming",
45
45
  title: "CDS Naming",
46
46
  shortDescription: `Checks CDS naming conventions based on the VDM prefix rules`,
47
- extendedInformation: `Validates that CDS entity names follow the expected prefix conventions:
48
- I_ for interface views, C_ for consumption views, R_ for restricted reuse views,
49
- P_ for private views, A_ for remote API views, X_ for view extends,
50
- E_ for extension include views, F_ for derivation functions, D_ for abstract entities.
51
-
52
- Names must also start with Z after the prefix (custom namespace).
53
-
47
+ extendedInformation: `Validates that CDS entity names follow the expected prefix conventions:
48
+ I_ for interface views, C_ for consumption views, R_ for restricted reuse views,
49
+ P_ for private views, A_ for remote API views, X_ for view extends,
50
+ E_ for extension include views, F_ for derivation functions, D_ for abstract entities.
51
+
52
+ Names must also start with Z after the prefix (custom namespace).
53
+
54
54
  https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/ee6ff9b281d8448f96b4fe6c89f2bdc8/8a8cee943ef944fe8936f4cc60ba9bc1.html`,
55
55
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Naming],
56
56
  badExample: `define view entity ZMY_VIEW as select from source { key id }`,
@@ -78,10 +78,10 @@ class ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {
78
78
  key: "chain_mainly_declarations",
79
79
  title: "Chain mainly declarations",
80
80
  shortDescription: `Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.`,
81
- extendedInformation: `
82
- https://docs.abapopenchecks.org/checks/23/
83
-
84
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
81
+ extendedInformation: `
82
+ https://docs.abapopenchecks.org/checks/23/
83
+
84
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
85
85
  `,
86
86
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
87
87
  badExample: `CALL METHOD: bar.`,
@@ -62,17 +62,17 @@ class ChangeIfToCase extends _abap_rule_1.ABAPRule {
62
62
  title: "Change IF to CASE",
63
63
  shortDescription: `Finds IF constructs that can be changed to CASE`,
64
64
  // eslint-disable-next-line max-len
65
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
66
-
65
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
66
+
67
67
  If the first comparison is a boolean compare, no issue is reported.`,
68
68
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
69
- badExample: `IF l_fcat-fieldname EQ 'FOO'.
70
- ELSEIF l_fcat-fieldname = 'BAR'
71
- OR l_fcat-fieldname = 'MOO'.
69
+ badExample: `IF l_fcat-fieldname EQ 'FOO'.
70
+ ELSEIF l_fcat-fieldname = 'BAR'
71
+ OR l_fcat-fieldname = 'MOO'.
72
72
  ENDIF.`,
73
- goodExample: `CASE l_fcat-fieldname.
74
- WHEN 'FOO'.
75
- WHEN 'BAR' OR 'MOO'.
73
+ goodExample: `CASE l_fcat-fieldname.
74
+ WHEN 'FOO'.
75
+ WHEN 'BAR' OR 'MOO'.
76
76
  ENDCASE.`,
77
77
  };
78
78
  }
@@ -23,8 +23,8 @@ class CheckAbstract extends _abap_rule_1.ABAPRule {
23
23
  return {
24
24
  key: "check_abstract",
25
25
  title: "Check abstract methods and classes",
26
- shortDescription: `Checks abstract methods and classes:
27
- - class defined as abstract and final,
26
+ shortDescription: `Checks abstract methods and classes:
27
+ - class defined as abstract and final,
28
28
  - non-abstract class contains abstract methods`,
29
29
  extendedInformation: `If a class defines only constants, use an interface instead`,
30
30
  tags: [_irule_1.RuleTag.SingleFile],
@@ -28,11 +28,11 @@ class CheckComments extends _abap_rule_1.ABAPRule {
28
28
  return {
29
29
  key: "check_comments",
30
30
  title: "Check Comments",
31
- shortDescription: `
31
+ shortDescription: `
32
32
  Various checks for comment usage.`,
33
- extendedInformation: `
34
- Detects end of line comments. Comments starting with "#EC" or "##" are ignored
35
-
33
+ extendedInformation: `
34
+ Detects end of line comments. Comments starting with "#EC" or "##" are ignored
35
+
36
36
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
37
37
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
38
38
  badExample: `WRITE 2. " descriptive comment`,
@@ -23,10 +23,10 @@ class CheckInclude {
23
23
  key: "check_include",
24
24
  title: "Check INCLUDEs",
25
25
  shortDescription: `Checks INCLUDE statements`,
26
- extendedInformation: `
27
- * Reports unused includes
28
- * Errors if the includes are not found
29
- * Error if including a main program
26
+ extendedInformation: `
27
+ * Reports unused includes
28
+ * Errors if the includes are not found
29
+ * Error if including a main program
30
30
  * Skips ZX* includes`,
31
31
  tags: [_irule_1.RuleTag.Syntax],
32
32
  };
@@ -69,14 +69,14 @@ class CheckSubrc extends _abap_rule_1.ABAPRule {
69
69
  key: "check_subrc",
70
70
  title: "Check sy-subrc",
71
71
  shortDescription: `Check sy-subrc`,
72
- extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
73
-
74
- If sy-dbcnt is checked after database statements, it is considered okay.
75
-
76
- "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
77
-
78
- If IS ASSIGNED is checked after assigning, it is considered okay.
79
-
72
+ extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
73
+
74
+ If sy-dbcnt is checked after database statements, it is considered okay.
75
+
76
+ "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
77
+
78
+ If IS ASSIGNED is checked after assigning, it is considered okay.
79
+
80
80
  FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
81
81
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
82
82
  pseudoComment: "EC CI_SUBRC",
@@ -37,13 +37,13 @@ class ClassAttributeNames extends _abap_rule_1.ABAPRule {
37
37
  title: "Class attributes naming",
38
38
  shortDescription: `Allows you to enforce a pattern, such as a prefix, for class variable names.`,
39
39
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
40
- badExample: `CLASS zcl_foo DEFINITION PUBLIC.
41
- PUBLIC SECTION.
42
- DATA counter TYPE i.
40
+ badExample: `CLASS zcl_foo DEFINITION PUBLIC.
41
+ PUBLIC SECTION.
42
+ DATA counter TYPE i.
43
43
  ENDCLASS.`,
44
- goodExample: `CLASS zcl_foo DEFINITION PUBLIC.
45
- PUBLIC SECTION.
46
- DATA mv_counter TYPE i.
44
+ goodExample: `CLASS zcl_foo DEFINITION PUBLIC.
45
+ PUBLIC SECTION.
46
+ DATA mv_counter TYPE i.
47
47
  ENDCLASS.`,
48
48
  };
49
49
  }
@@ -54,17 +54,17 @@ class ClassicExceptionsOverlap extends _abap_rule_1.ABAPRule {
54
54
  shortDescription: `Find overlapping classic exceptions`,
55
55
  extendedInformation: `When debugging its typically good to know exactly which exception is caught`,
56
56
  tags: [_irule_1.RuleTag.SingleFile],
57
- badExample: `CALL FUNCTION 'SOMETHING'
58
- EXCEPTIONS
59
- system_failure = 1 MESSAGE lv_message
60
- communication_failure = 1 MESSAGE lv_message
61
- resource_failure = 1
57
+ badExample: `CALL FUNCTION 'SOMETHING'
58
+ EXCEPTIONS
59
+ system_failure = 1 MESSAGE lv_message
60
+ communication_failure = 1 MESSAGE lv_message
61
+ resource_failure = 1
62
62
  OTHERS = 1.`,
63
- goodExample: `CALL FUNCTION 'SOMETHING'
64
- EXCEPTIONS
65
- system_failure = 1 MESSAGE lv_message
66
- communication_failure = 2 MESSAGE lv_message
67
- resource_failure = 3
63
+ goodExample: `CALL FUNCTION 'SOMETHING'
64
+ EXCEPTIONS
65
+ system_failure = 1 MESSAGE lv_message
66
+ communication_failure = 2 MESSAGE lv_message
67
+ resource_failure = 3
68
68
  OTHERS = 4.`,
69
69
  };
70
70
  }
@@ -30,7 +30,7 @@ class CommentedCode extends _abap_rule_1.ABAPRule {
30
30
  key: "commented_code",
31
31
  title: "Find commented code",
32
32
  shortDescription: `Detects usage of commented out code.`,
33
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
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
36
  badExample: `* WRITE 'hello world'.`,
@@ -18,19 +18,19 @@ class ConstructorVisibilityPublic {
18
18
  key: "constructor_visibility_public",
19
19
  title: "Check constructor visibility is public",
20
20
  shortDescription: `Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.`,
21
- extendedInformation: `
22
- This only applies to global classes.
23
-
24
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
21
+ extendedInformation: `
22
+ This only applies to global classes.
23
+
24
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
25
25
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
26
26
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
27
- badExample: `CLASS zcl_foo DEFINITION PUBLIC CREATE PRIVATE.
28
- PRIVATE SECTION.
29
- METHODS constructor.
27
+ badExample: `CLASS zcl_foo DEFINITION PUBLIC CREATE PRIVATE.
28
+ PRIVATE SECTION.
29
+ METHODS constructor.
30
30
  ENDCLASS.`,
31
- goodExample: `CLASS zcl_foo DEFINITION PUBLIC CREATE PRIVATE.
32
- PUBLIC SECTION.
33
- METHODS constructor.
31
+ goodExample: `CLASS zcl_foo DEFINITION PUBLIC CREATE PRIVATE.
32
+ PUBLIC SECTION.
33
+ METHODS constructor.
34
34
  ENDCLASS.`,
35
35
  };
36
36
  }
@@ -25,8 +25,8 @@ class ContainsTab extends _abap_rule_1.ABAPRule {
25
25
  key: "contains_tab",
26
26
  title: "Code contains tab",
27
27
  shortDescription: `Checks for usage of tabs (enable to enforce spaces)`,
28
- extendedInformation: `
29
- https://docs.abapopenchecks.org/checks/09/
28
+ extendedInformation: `
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
32
  badExample: `\tWRITE 'hello world'.`,
@@ -32,10 +32,10 @@ class CyclicOO {
32
32
  key: "cyclic_oo",
33
33
  title: "Cyclic OO",
34
34
  shortDescription: `Finds cyclic/circular OO references`,
35
- extendedInformation: `Runs for global INTF + CLAS objects
36
-
37
- Objects must be without syntax errors for this rule to take effect
38
-
35
+ extendedInformation: `Runs for global INTF + CLAS objects
36
+
37
+ Objects must be without syntax errors for this rule to take effect
38
+
39
39
  References in testclass includes are ignored`,
40
40
  };
41
41
  }
@@ -77,7 +77,7 @@ class DangerousStatement extends _abap_rule_1.ABAPRule {
77
77
  key: "dangerous_statement",
78
78
  title: "Dangerous statement",
79
79
  shortDescription: `Detects potentially dangerous statements`,
80
- extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
80
+ extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
81
81
  dynamic SQL can potentially create SQL injection problems`,
82
82
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
83
83
  badExample: `SELECT * FROM (lv_table_name) INTO TABLE @DATA(lt_rows).`,
@@ -54,16 +54,16 @@ class DbOperationInLoop extends _abap_rule_1.ABAPRule {
54
54
  title: "Database operation in loop",
55
55
  shortDescription: `Database operation in LOOP/DO/WHILE`,
56
56
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
57
- badExample: `LOOP AT lt_items INTO DATA(ls_item).
58
- SELECT SINGLE name FROM zcustomer INTO @DATA(lv_name) WHERE id = @ls_item-customer_id.
57
+ badExample: `LOOP AT lt_items INTO DATA(ls_item).
58
+ SELECT SINGLE name FROM zcustomer INTO @DATA(lv_name) WHERE id = @ls_item-customer_id.
59
59
  ENDLOOP.`,
60
- goodExample: `ASSERT lines( lt_items ) > 0.
61
- SELECT id, name FROM zcustomer INTO TABLE @DATA(lt_customers)
62
- FOR ALL ENTRIES IN @lt_items
63
- WHERE id = @lt_items-customer_id.
64
-
65
- LOOP AT lt_items INTO DATA(ls_item).
66
- READ TABLE lt_customers INTO DATA(ls_customer) WITH KEY id = ls_item-customer_id.
60
+ goodExample: `ASSERT lines( lt_items ) > 0.
61
+ SELECT id, name FROM zcustomer INTO TABLE @DATA(lt_customers)
62
+ FOR ALL ENTRIES IN @lt_items
63
+ WHERE id = @lt_items-customer_id.
64
+
65
+ LOOP AT lt_items INTO DATA(ls_item).
66
+ READ TABLE lt_customers INTO DATA(ls_customer) WITH KEY id = ls_item-customer_id.
67
67
  ENDLOOP.`,
68
68
  };
69
69
  }
@@ -63,13 +63,13 @@ class DefinitionsTop extends _abap_rule_1.ABAPRule {
63
63
  shortDescription: `Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.`,
64
64
  extendedInformation: `https://docs.abapopenchecks.org/checks/17/`,
65
65
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
66
- badExample: `FORM foo.
67
- WRITE 'hello'.
68
- DATA int TYPE i.
66
+ badExample: `FORM foo.
67
+ WRITE 'hello'.
68
+ DATA int TYPE i.
69
69
  ENDFORM.`,
70
- goodExample: `FORM foo.
71
- DATA int TYPE i.
72
- WRITE 'hello'.
70
+ goodExample: `FORM foo.
71
+ DATA int TYPE i.
72
+ WRITE 'hello'.
73
73
  ENDFORM.`,
74
74
  };
75
75
  }