@abaplint/core 2.120.0 → 2.120.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.
Files changed (138) hide show
  1. package/README.md +6 -6
  2. package/build/src/abap/5_syntax/expressions/source.js +1 -0
  3. package/build/src/abap/5_syntax/statements/call_transformation.js +3 -1
  4. package/build/src/cds/expressions/cds_define_abstract.js +1 -1
  5. package/build/src/cds/expressions/cds_define_custom.js +1 -1
  6. package/build/src/cds/expressions/cds_define_external_entity.js +1 -1
  7. package/build/src/cds/expressions/cds_define_hierarchy.js +1 -1
  8. package/build/src/cds/expressions/cds_define_projection.js +1 -1
  9. package/build/src/cds/expressions/cds_define_table_entity.js +1 -1
  10. package/build/src/lsp/help.js +10 -10
  11. package/build/src/registry.js +1 -1
  12. package/build/src/rules/7bit_ascii.js +4 -4
  13. package/build/src/rules/abapdoc.js +4 -4
  14. package/build/src/rules/add_test_attributes.js +20 -20
  15. package/build/src/rules/align_parameters.js +40 -40
  16. package/build/src/rules/align_type_expressions.js +28 -28
  17. package/build/src/rules/ambiguous_statement.js +7 -7
  18. package/build/src/rules/avoid_use.js +10 -10
  19. package/build/src/rules/begin_end_names.js +4 -4
  20. package/build/src/rules/begin_single_include.js +13 -13
  21. package/build/src/rules/call_transaction_authority_check.js +3 -3
  22. package/build/src/rules/cds_association_name.js +6 -6
  23. package/build/src/rules/cds_comment_style.js +4 -4
  24. package/build/src/rules/cds_field_order.js +12 -12
  25. package/build/src/rules/cds_legacy_view.js +4 -4
  26. package/build/src/rules/cds_naming.js +7 -7
  27. package/build/src/rules/chain_mainly_declarations.js +4 -4
  28. package/build/src/rules/change_if_to_case.js +8 -8
  29. package/build/src/rules/check_abstract.js +2 -2
  30. package/build/src/rules/check_comments.js +4 -4
  31. package/build/src/rules/check_include.js +4 -4
  32. package/build/src/rules/check_subrc.js +8 -8
  33. package/build/src/rules/class_attribute_names.js +6 -6
  34. package/build/src/rules/classic_exceptions_overlap.js +10 -10
  35. package/build/src/rules/clear_exporting_parameters.js +254 -0
  36. package/build/src/rules/commented_code.js +1 -1
  37. package/build/src/rules/constructor_visibility_public.js +10 -10
  38. package/build/src/rules/contains_tab.js +2 -2
  39. package/build/src/rules/cyclic_oo.js +4 -4
  40. package/build/src/rules/dangerous_statement.js +1 -1
  41. package/build/src/rules/db_operation_in_loop.js +9 -9
  42. package/build/src/rules/definitions_top.js +6 -6
  43. package/build/src/rules/downport.js +83 -83
  44. package/build/src/rules/easy_to_find_messages.js +6 -6
  45. package/build/src/rules/empty_event.js +6 -6
  46. package/build/src/rules/empty_line_in_statement.js +2 -2
  47. package/build/src/rules/empty_structure.js +6 -6
  48. package/build/src/rules/exit_or_check.js +7 -7
  49. package/build/src/rules/expand_macros.js +5 -5
  50. package/build/src/rules/exporting.js +1 -1
  51. package/build/src/rules/forbidden_identifier.js +1 -1
  52. package/build/src/rules/forbidden_void_type.js +2 -2
  53. package/build/src/rules/form_tables_obsolete.js +2 -2
  54. package/build/src/rules/fully_type_itabs.js +2 -2
  55. package/build/src/rules/function_module_recommendations.js +2 -2
  56. package/build/src/rules/functional_writing.js +17 -17
  57. package/build/src/rules/global_class.js +10 -10
  58. package/build/src/rules/identical_conditions.js +12 -12
  59. package/build/src/rules/identical_contents.js +14 -14
  60. package/build/src/rules/identical_descriptions.js +6 -6
  61. package/build/src/rules/identical_move.js +2 -2
  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 +4 -4
  65. package/build/src/rules/in_statement_indentation.js +11 -11
  66. package/build/src/rules/indentation.js +16 -16
  67. package/build/src/rules/index.js +1 -0
  68. package/build/src/rules/intf_referencing_clas.js +3 -3
  69. package/build/src/rules/invalid_table_index.js +2 -2
  70. package/build/src/rules/line_break_style.js +2 -2
  71. package/build/src/rules/line_length.js +2 -2
  72. package/build/src/rules/line_only_punc.js +1 -1
  73. package/build/src/rules/local_class_naming.js +2 -2
  74. package/build/src/rules/local_variable_names.js +6 -6
  75. package/build/src/rules/macro_naming.js +2 -2
  76. package/build/src/rules/main_file_contents.js +4 -4
  77. package/build/src/rules/many_parentheses.js +10 -10
  78. package/build/src/rules/max_one_method_parameter_per_line.js +7 -7
  79. package/build/src/rules/max_one_statement.js +5 -5
  80. package/build/src/rules/method_length.js +2 -2
  81. package/build/src/rules/method_overwrites_builtin.js +12 -12
  82. package/build/src/rules/method_parameter_names.js +4 -4
  83. package/build/src/rules/mix_returning.js +8 -8
  84. package/build/src/rules/nesting.js +1 -1
  85. package/build/src/rules/no_aliases.js +5 -5
  86. package/build/src/rules/no_chained_assignment.js +1 -1
  87. package/build/src/rules/no_comments_between_methods.js +12 -12
  88. package/build/src/rules/no_external_form_calls.js +2 -2
  89. package/build/src/rules/no_inline_in_optional_branches.js +11 -11
  90. package/build/src/rules/no_macros.js +4 -4
  91. package/build/src/rules/no_prefixes.js +6 -6
  92. package/build/src/rules/no_public_attributes.js +7 -7
  93. package/build/src/rules/no_yoda_conditions.js +4 -4
  94. package/build/src/rules/nrob_consistency.js +2 -2
  95. package/build/src/rules/obsolete_statement.js +51 -51
  96. package/build/src/rules/omit_parameter_name.js +3 -3
  97. package/build/src/rules/omit_receiving.js +13 -13
  98. package/build/src/rules/parser_702_chaining.js +2 -2
  99. package/build/src/rules/parser_error.js +2 -2
  100. package/build/src/rules/parser_missing_space.js +1 -1
  101. package/build/src/rules/prefer_inline.js +16 -16
  102. package/build/src/rules/prefer_is_not.js +9 -9
  103. package/build/src/rules/prefer_raise_exception_new.js +5 -5
  104. package/build/src/rules/prefer_returning_to_exporting.js +4 -4
  105. package/build/src/rules/prefer_xsdbool.js +2 -2
  106. package/build/src/rules/preferred_compare_operator.js +2 -2
  107. package/build/src/rules/prefix_is_current_class.js +6 -6
  108. package/build/src/rules/reduce_procedural_code.js +17 -17
  109. package/build/src/rules/redundant_conversion.js +2 -2
  110. package/build/src/rules/remove_descriptions.js +4 -4
  111. package/build/src/rules/rfc_error_handling.js +7 -7
  112. package/build/src/rules/select_add_order_by.js +5 -5
  113. package/build/src/rules/select_performance.js +5 -5
  114. package/build/src/rules/select_single_full_key.js +2 -2
  115. package/build/src/rules/selection_screen_texts_missing.js +2 -2
  116. package/build/src/rules/sicf_consistency.js +2 -2
  117. package/build/src/rules/slow_parameter_passing.js +16 -16
  118. package/build/src/rules/space_before_dot.js +2 -2
  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 +6 -6
  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
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
- # @abaplint/core
2
-
3
- [abaplint](https://abaplint.org) core library
4
-
5
- Exposes functionality like the parser and rules, which can be used in other projects.
6
-
1
+ # @abaplint/core
2
+
3
+ [abaplint](https://abaplint.org) core library
4
+
5
+ Exposes functionality like the parser and rules, which can be used in other projects.
6
+
7
7
  For more information see https://github.com/abaplint/abaplint
@@ -111,6 +111,7 @@ class Source {
111
111
  else {
112
112
  this.addIfInferred(node, input, foundType);
113
113
  }
114
+ this.traverseRemainingChildren(children, input);
114
115
  return foundType ? foundType : bodyType;
115
116
  }
116
117
  case "SWITCH":
@@ -42,8 +42,10 @@ const inline_data_1 = require("../expressions/inline_data");
42
42
  const dynamic_1 = require("../expressions/dynamic");
43
43
  class CallTransformation {
44
44
  runSyntax(node, input) {
45
+ const resultParameters = node.findExpressionAfterToken("RESULT");
46
+ const resultSources = new Set((resultParameters === null || resultParameters === void 0 ? void 0 : resultParameters.findAllExpressions(Expressions.SimpleSource3)) || []);
45
47
  for (const s of node.findAllExpressions(Expressions.SimpleSource3)) {
46
- source_1.Source.runSyntax(s, input);
48
+ source_1.Source.runSyntax(s, input, undefined, resultSources.has(s));
47
49
  }
48
50
  for (const d of node.findAllExpressions(Expressions.Dynamic)) {
49
51
  dynamic_1.Dynamic.runSyntax(d, input);
@@ -8,7 +8,7 @@ class CDSDefineAbstract extends combi_1.Expression {
8
8
  getRunnable() {
9
9
  const field = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.optPrio)((0, combi_1.str)("KEY")), cds_name_1.CDSName, ":", _1.CDSType, ";");
10
10
  const compsiOrAssoci = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), cds_name_1.CDSName, ":", (0, combi_1.alt)(_1.CDSComposition, _1.CDSAssociation), ";");
11
- return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), "DEFINE", (0, combi_1.opt)("ROOT"), "ABSTRACT", "ENTITY", cds_name_1.CDSName, (0, combi_1.opt)(_1.CDSWithParameters), (0, combi_1.str)("{"), (0, combi_1.plus)((0, combi_1.alt)(field, compsiOrAssoci)), (0, combi_1.str)("}"), (0, combi_1.opt)(";"));
11
+ return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.opt)("DEFINE"), (0, combi_1.opt)("ROOT"), "ABSTRACT", "ENTITY", cds_name_1.CDSName, (0, combi_1.opt)(_1.CDSWithParameters), (0, combi_1.str)("{"), (0, combi_1.plus)((0, combi_1.alt)(field, compsiOrAssoci)), (0, combi_1.str)("}"), (0, combi_1.opt)(";"));
12
12
  }
13
13
  }
14
14
  exports.CDSDefineAbstract = CDSDefineAbstract;
@@ -9,7 +9,7 @@ class CDSDefineCustom extends combi_1.Expression {
9
9
  getRunnable() {
10
10
  const field = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.str)("KEY")), cds_name_1.CDSName, ":", cds_type_1.CDSType, ";");
11
11
  const compsiOrAssoci = (0, combi_1.seq)(cds_name_1.CDSName, ":", (0, combi_1.alt)(_1.CDSComposition, _1.CDSAssociation), ";");
12
- return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.str)("DEFINE"), (0, combi_1.opt)((0, combi_1.str)("ROOT")), (0, combi_1.str)("CUSTOM ENTITY"), cds_name_1.CDSName, (0, combi_1.opt)(_1.CDSWithParameters), (0, combi_1.str)("{"), (0, combi_1.plus)((0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.alt)(field, compsiOrAssoci))), (0, combi_1.str)("}"), (0, combi_1.opt)(";"));
12
+ return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.opt)("DEFINE"), (0, combi_1.opt)("ROOT"), (0, combi_1.str)("CUSTOM ENTITY"), cds_name_1.CDSName, (0, combi_1.opt)(_1.CDSWithParameters), (0, combi_1.str)("{"), (0, combi_1.plus)((0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.alt)(field, compsiOrAssoci))), (0, combi_1.str)("}"), (0, combi_1.opt)(";"));
13
13
  }
14
14
  }
15
15
  exports.CDSDefineCustom = CDSDefineCustom;
@@ -13,7 +13,7 @@ class CDSDefineExternalEntity extends combi_1.Expression {
13
13
  const body = (0, combi_1.plus)((0, combi_1.alt)(field, assocOrComp));
14
14
  const externalEntity = (0, combi_1.seq)((0, combi_1.opt)("WRITABLE"), "EXTERNAL", "ENTITY", _1.CDSName, (0, combi_1.opt)(externalName), (0, combi_1.opt)(_1.CDSWithParameters));
15
15
  const staticEntity = (0, combi_1.seq)("STATIC", "ENTITY", _1.CDSName, (0, combi_1.opt)(externalName));
16
- return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), "DEFINE", (0, combi_1.alt)(externalEntity, staticEntity), (0, combi_1.str)("{"), body, (0, combi_1.str)("}"), (0, combi_1.opt)((0, combi_1.seq)("WITH", "FEDERATED", "DATA", (0, combi_1.optPrio)((0, combi_1.alt)((0, combi_1.seq)("PROVIDED", "AT", "RUNTIME"), (0, combi_1.seq)("PROVIDED", "BY", _1.CDSName))))), (0, combi_1.opt)(";"));
16
+ return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.opt)("DEFINE"), (0, combi_1.alt)(externalEntity, staticEntity), (0, combi_1.str)("{"), body, (0, combi_1.str)("}"), (0, combi_1.opt)((0, combi_1.seq)("WITH", "FEDERATED", "DATA", (0, combi_1.optPrio)((0, combi_1.alt)((0, combi_1.seq)("PROVIDED", "AT", "RUNTIME"), (0, combi_1.seq)("PROVIDED", "BY", _1.CDSName))))), (0, combi_1.opt)(";"));
17
17
  }
18
18
  }
19
19
  exports.CDSDefineExternalEntity = CDSDefineExternalEntity;
@@ -15,7 +15,7 @@ class CDSDefineHierarchy extends combi_1.Expression {
15
15
  const depthValue = (0, combi_1.altPrio)(_1.CDSString, _1.CDSInteger, _1.CDSPrefixedName);
16
16
  const loadMode = (0, combi_1.altPrio)("BULK", "INCREMENTAL", _1.CDSPrefixedName);
17
17
  const hierarchyBody = (0, combi_1.seq)("SOURCE", _1.CDSName, (0, combi_1.opt)(_1.CDSParametersSelect), "CHILD", "TO", "PARENT", "ASSOCIATION", _1.CDSName, (0, combi_1.opt)(directory), (0, combi_1.opt)(datePeriod), (0, combi_1.opt)((0, combi_1.seq)("START", "WHERE", _1.CDSCondition)), (0, combi_1.opt)(siblingsOrder), (0, combi_1.opt)((0, combi_1.seq)("LOAD", loadMode)), (0, combi_1.opt)((0, combi_1.seq)("DEPTH", depthValue)), (0, combi_1.opt)((0, combi_1.seq)("NODETYPE", _1.CDSName)), (0, combi_1.opt)((0, combi_1.seq)("MULTIPLE", "PARENTS", (0, combi_1.altPrio)("NOT ALLOWED", "ALLOWED", (0, combi_1.seq)("LEAVES", (0, combi_1.optPrio)("ONLY"))))), (0, combi_1.opt)((0, combi_1.seq)("ORPHANS", (0, combi_1.altPrio)("IGNORE", "ROOT", "ERROR"))), (0, combi_1.opt)((0, combi_1.seq)("CYCLES", (0, combi_1.altPrio)("BREAKUP", "ERROR"))), (0, combi_1.opt)((0, combi_1.seq)("GENERATE", "SPANTREE")), (0, combi_1.opt)((0, combi_1.seq)("CACHE", (0, combi_1.altPrio)("ON", "OFF", "FORCE"))));
18
- return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), "DEFINE", "HIERARCHY", _1.CDSName, (0, combi_1.opt)(_1.CDSWithParameters), "AS", "PARENT", "CHILD", "HIERARCHY", "(", hierarchyBody, ")", "{", (0, combi_1.seq)(field, (0, combi_1.star)((0, combi_1.seq)(",", field))), "}", (0, combi_1.opt)(";"));
18
+ return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.opt)("DEFINE"), "HIERARCHY", _1.CDSName, (0, combi_1.opt)(_1.CDSWithParameters), "AS", "PARENT", "CHILD", "HIERARCHY", "(", hierarchyBody, ")", "{", (0, combi_1.seq)(field, (0, combi_1.star)((0, combi_1.seq)(",", field))), "}", (0, combi_1.opt)(";"));
19
19
  }
20
20
  }
21
21
  exports.CDSDefineHierarchy = CDSDefineHierarchy;
@@ -8,7 +8,7 @@ class CDSDefineProjection extends combi_1.Expression {
8
8
  getRunnable() {
9
9
  // redefine association _Assoc redirected to [composition child | parent] Entity
10
10
  const redefineAssoc = (0, combi_1.seq)("REDEFINE", "ASSOCIATION", _1.CDSName, "REDIRECTED", "TO", (0, combi_1.optPrio)((0, combi_1.altPrio)((0, combi_1.seq)("COMPOSITION", "CHILD"), "PARENT")), _1.CDSName);
11
- return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), "DEFINE", (0, combi_1.opt)("ROOT"), (0, combi_1.opt)("TRANSIENT"), "VIEW", (0, combi_1.ver)(__1.Release.v755, (0, combi_1.opt)("ENTITY")), _1.CDSName, (0, combi_1.opt)(_1.CDSProviderContract), (0, combi_1.opt)(_1.CDSWithParameters), "AS PROJECTION ON", _1.CDSName, (0, combi_1.opt)(_1.CDSParametersSelect), (0, combi_1.opt)(_1.CDSAs), (0, combi_1.star)((0, combi_1.altPrio)(_1.CDSAssociation, redefineAssoc)), (0, combi_1.str)("{"), (0, combi_1.seq)(_1.CDSElement, (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.opt)(",")), (0, combi_1.str)("}"), (0, combi_1.opt)(_1.CDSWhere), (0, combi_1.opt)(";"));
11
+ return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.opt)("DEFINE"), (0, combi_1.opt)("ROOT"), (0, combi_1.opt)("TRANSIENT"), "VIEW", (0, combi_1.ver)(__1.Release.v755, (0, combi_1.opt)("ENTITY")), _1.CDSName, (0, combi_1.opt)(_1.CDSProviderContract), (0, combi_1.opt)(_1.CDSWithParameters), "AS PROJECTION ON", _1.CDSName, (0, combi_1.opt)(_1.CDSParametersSelect), (0, combi_1.opt)(_1.CDSAs), (0, combi_1.star)((0, combi_1.altPrio)(_1.CDSAssociation, redefineAssoc)), (0, combi_1.str)("{"), (0, combi_1.seq)(_1.CDSElement, (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.opt)(",")), (0, combi_1.str)("}"), (0, combi_1.opt)(_1.CDSWhere), (0, combi_1.opt)(";"));
12
12
  }
13
13
  }
14
14
  exports.CDSDefineProjection = CDSDefineProjection;
@@ -12,7 +12,7 @@ class CDSDefineTableEntity extends combi_1.Expression {
12
12
  const elementList = (0, combi_1.seq)(_1.CDSElement, (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.opt)(","));
13
13
  const elements = (0, combi_1.seq)((0, combi_1.str)("{"), (0, combi_1.altPrio)("*", elementList), (0, combi_1.str)("}"));
14
14
  const selectBody = (0, combi_1.seq)("AS", "SELECT", "FROM", _1.CDSSource, (0, combi_1.star)(_1.CDSJoin), (0, combi_1.star)((0, combi_1.altPrio)(_1.CDSComposition, _1.CDSAssociation)), (0, combi_1.opt)(elements), (0, combi_1.optPrio)(_1.CDSWhere));
15
- return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), "DEFINE", (0, combi_1.opt)("ROOT"), "TABLE", "ENTITY", _1.CDSName, (0, combi_1.opt)(_1.CDSWithParameters), (0, combi_1.altPrio)((0, combi_1.seq)((0, combi_1.str)("{"), inlineBody, (0, combi_1.str)("}")), selectBody), (0, combi_1.opt)(";"));
15
+ return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.opt)("DEFINE"), (0, combi_1.opt)("ROOT"), "TABLE", "ENTITY", _1.CDSName, (0, combi_1.opt)(_1.CDSWithParameters), (0, combi_1.altPrio)((0, combi_1.seq)((0, combi_1.str)("{"), inlineBody, (0, combi_1.str)("}")), selectBody), (0, combi_1.opt)(";"));
16
16
  }
17
17
  }
18
18
  exports.CDSDefineTableEntity = CDSDefineTableEntity;
@@ -51,13 +51,13 @@ class Help {
51
51
  }
52
52
  static dumpABAP(file, reg, textDocument, position) {
53
53
  let content = "";
54
- content = `
55
- <a href="#_tokens" rel="no-refresh">Tokens</a> |
56
- <a href="#_statements" rel="no-refresh">Statements</a> |
57
- <a href="#_structure" rel="no-refresh">Structure</a> |
58
- <a href="#_files" rel="no-refresh">Files</a> |
59
- <a href="#_info" rel="no-refresh">Info Dump</a>
60
- <hr>
54
+ content = `
55
+ <a href="#_tokens" rel="no-refresh">Tokens</a> |
56
+ <a href="#_statements" rel="no-refresh">Statements</a> |
57
+ <a href="#_structure" rel="no-refresh">Structure</a> |
58
+ <a href="#_files" rel="no-refresh">Files</a> |
59
+ <a href="#_info" rel="no-refresh">Info Dump</a>
60
+ <hr>
61
61
  ` +
62
62
  "<tt>" + textDocument.uri + " (" +
63
63
  (position.line + 1) + ", " +
@@ -212,9 +212,9 @@ class Help {
212
212
  return ret + "</ul>";
213
213
  }
214
214
  static tokens(file) {
215
- let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
216
- <td><b>Row</b></td><td><b>Column</b></td>
217
- <td><b>vRow</b></td><td><b>vColumn</b></td>
215
+ let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
216
+ <td><b>Row</b></td><td><b>Column</b></td>
217
+ <td><b>vRow</b></td><td><b>vColumn</b></td>
218
218
  </tr>`;
219
219
  for (const token of file.getTokens()) {
220
220
  const tStart = token.getStart();
@@ -75,7 +75,7 @@ class Registry {
75
75
  }
76
76
  static abaplintVersion() {
77
77
  // magic, see build script "version.js"
78
- return "2.120.0";
78
+ return "2.120.2";
79
79
  }
80
80
  getDDICReferences() {
81
81
  return this.ddicReferences;
@@ -17,10 +17,10 @@ class SevenBitAscii {
17
17
  key: "7bit_ascii",
18
18
  title: "Check for 7bit ascii",
19
19
  shortDescription: `Only allow characters from the 7bit ASCII set.`,
20
- extendedInformation: `https://docs.abapopenchecks.org/checks/05/
21
-
22
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
23
-
20
+ extendedInformation: `https://docs.abapopenchecks.org/checks/05/
21
+
22
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
23
+
24
24
  Checkes files with extensions ".abap" and ".asddls"`,
25
25
  tags: [_irule_1.RuleTag.SingleFile],
26
26
  badExample: `WRITE '뽑'.`,
@@ -28,10 +28,10 @@ class Abapdoc extends _abap_rule_1.ABAPRule {
28
28
  key: "abapdoc",
29
29
  title: "Check abapdoc",
30
30
  shortDescription: `Various checks regarding abapdoc.`,
31
- extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
32
-
33
- Plus class and interface definitions.
34
-
31
+ extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
32
+
33
+ Plus class and interface definitions.
34
+
35
35
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-only-for-public-apis`,
36
36
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
37
37
  };
@@ -54,27 +54,27 @@ class AddTestAttributes extends _abap_rule_1.ABAPRule {
54
54
  title: "Add test attributes for tests classes with test methods",
55
55
  shortDescription: `Add test attributes DURATION and RISK LEVEL for tests classes with test methods`,
56
56
  tags: [_irule_1.RuleTag.SingleFile],
57
- badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
58
- PUBLIC SECTION.
59
- PROTECTED SECTION.
60
- PRIVATE SECTION.
61
- METHODS test FOR TESTING RAISING cx_static_check.
62
- ENDCLASS.
63
-
64
- CLASS ltcl_test1 IMPLEMENTATION.
65
- METHOD test.
66
- ENDMETHOD.
57
+ badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
58
+ PUBLIC SECTION.
59
+ PROTECTED SECTION.
60
+ PRIVATE SECTION.
61
+ METHODS test FOR TESTING RAISING cx_static_check.
62
+ ENDCLASS.
63
+
64
+ CLASS ltcl_test1 IMPLEMENTATION.
65
+ METHOD test.
66
+ ENDMETHOD.
67
67
  ENDCLASS.`,
68
- goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
69
- PUBLIC SECTION.
70
- PROTECTED SECTION.
71
- PRIVATE SECTION.
72
- METHODS test FOR TESTING RAISING cx_static_check.
73
- ENDCLASS.
74
-
75
- CLASS ltcl_test2 IMPLEMENTATION.
76
- METHOD test.
77
- ENDMETHOD.
68
+ goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
69
+ PUBLIC SECTION.
70
+ PROTECTED SECTION.
71
+ PRIVATE SECTION.
72
+ METHODS test FOR TESTING RAISING cx_static_check.
73
+ ENDCLASS.
74
+
75
+ CLASS ltcl_test2 IMPLEMENTATION.
76
+ METHOD test.
77
+ ENDMETHOD.
78
78
  ENDCLASS.`,
79
79
  };
80
80
  }
@@ -55,49 +55,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
55
55
  key: "align_parameters",
56
56
  title: "Align Parameters",
57
57
  shortDescription: `Checks for vertially aligned parameters`,
58
- extendedInformation: `Checks:
59
- * function module calls
60
- * method calls
61
- * VALUE constructors
62
- * NEW constructors
63
- * RAISE EXCEPTION statements
64
- * CREATE OBJECT statements
65
- * RAISE EVENT statements
66
-
67
- https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
68
-
69
- Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
70
-
71
- If parameters are on the same row, no issues are reported, see
58
+ extendedInformation: `Checks:
59
+ * function module calls
60
+ * method calls
61
+ * VALUE constructors
62
+ * NEW constructors
63
+ * RAISE EXCEPTION statements
64
+ * CREATE OBJECT statements
65
+ * RAISE EVENT statements
66
+
67
+ https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
68
+
69
+ Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
70
+
71
+ If parameters are on the same row, no issues are reported, see
72
72
  https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
73
73
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
74
- badExample: `CALL FUNCTION 'FOOBAR'
75
- EXPORTING
76
- foo = 2
77
- parameter = 3.
78
-
79
- foobar( moo = 1
80
- param = 1 ).
81
-
82
- foo = VALUE #(
83
- foo = bar
74
+ badExample: `CALL FUNCTION 'FOOBAR'
75
+ EXPORTING
76
+ foo = 2
77
+ parameter = 3.
78
+
79
+ foobar( moo = 1
80
+ param = 1 ).
81
+
82
+ foo = VALUE #(
83
+ foo = bar
84
84
  moo = 2 ).`,
85
- goodExample: `CALL FUNCTION 'FOOBAR'
86
- EXPORTING
87
- foo = 2
88
- parameter = 3.
89
-
90
- foobar( moo = 1
91
- param = 1 ).
92
-
93
- foo = VALUE #(
94
- foo = bar
95
- moo = 2 ).
96
-
97
- DATA(sdf) = VALUE type(
98
- common_val = 2
99
- another_common = 5
100
- ( row_value = 4
85
+ goodExample: `CALL FUNCTION 'FOOBAR'
86
+ EXPORTING
87
+ foo = 2
88
+ parameter = 3.
89
+
90
+ foobar( moo = 1
91
+ param = 1 ).
92
+
93
+ foo = VALUE #(
94
+ foo = bar
95
+ moo = 2 ).
96
+
97
+ DATA(sdf) = VALUE type(
98
+ common_val = 2
99
+ another_common = 5
100
+ ( row_value = 4
101
101
  value_foo = 5 ) ).`,
102
102
  };
103
103
  }
@@ -63,37 +63,37 @@ class AlignTypeExpressions extends _abap_rule_1.ABAPRule {
63
63
  key: "align_type_expressions",
64
64
  title: "Align TYPE expressions",
65
65
  shortDescription: `Align TYPE expressions in statements`,
66
- extendedInformation: `
67
- Currently works for METHODS + BEGIN OF
68
-
69
- If BEGIN OF has an INCLUDE TYPE its ignored
70
-
71
- Also note that clean ABAP does not recommend aligning TYPE clauses:
66
+ extendedInformation: `
67
+ Currently works for METHODS + BEGIN OF
68
+
69
+ If BEGIN OF has an INCLUDE TYPE its ignored
70
+
71
+ Also note that clean ABAP does not recommend aligning TYPE clauses:
72
72
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-align-type-clauses`,
73
73
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix],
74
- badExample: `
75
- TYPES: BEGIN OF foo,
76
- bar TYPE i,
77
- foobar TYPE i,
78
- END OF foo.
79
-
80
- INTERFACE lif.
81
- METHODS bar
82
- IMPORTING
83
- foo TYPE i
84
- foobar TYPE i.
74
+ badExample: `
75
+ TYPES: BEGIN OF foo,
76
+ bar TYPE i,
77
+ foobar TYPE i,
78
+ END OF foo.
79
+
80
+ INTERFACE lif.
81
+ METHODS bar
82
+ IMPORTING
83
+ foo TYPE i
84
+ foobar TYPE i.
85
85
  ENDINTERFACE.`,
86
- goodExample: `
87
- TYPES: BEGIN OF foo,
88
- bar TYPE i,
89
- foobar TYPE i,
90
- END OF foo.
91
-
92
- INTERFACE lif.
93
- METHODS bar
94
- IMPORTING
95
- foo TYPE i
96
- foobar TYPE i.
86
+ goodExample: `
87
+ TYPES: BEGIN OF foo,
88
+ bar TYPE i,
89
+ foobar TYPE i,
90
+ END OF foo.
91
+
92
+ INTERFACE lif.
93
+ METHODS bar
94
+ IMPORTING
95
+ foo TYPE i
96
+ foobar TYPE i.
97
97
  ENDINTERFACE.`,
98
98
  };
99
99
  }
@@ -53,16 +53,16 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
53
53
  return {
54
54
  key: "ambiguous_statement",
55
55
  title: "Check for ambigious statements",
56
- shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
57
- Add "TABLE" keyword or "@" for escaping SQL variables
58
-
56
+ shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
57
+ Add "TABLE" keyword or "@" for escaping SQL variables
58
+
59
59
  Only works if the target version is 740sp05 or above`,
60
60
  tags: [_irule_1.RuleTag.SingleFile],
61
- badExample: `DELETE foo FROM bar.
61
+ badExample: `DELETE foo FROM bar.
62
62
  MODIFY foo FROM bar.`,
63
- goodExample: `DELETE foo FROM @bar.
64
- DELETE TABLE itab FROM 2.
65
- MODIFY zfoo FROM @wa.
63
+ goodExample: `DELETE foo FROM @bar.
64
+ DELETE TABLE itab FROM 2.
65
+ MODIFY zfoo FROM @wa.
66
66
  MODIFY TABLE foo FROM bar.`,
67
67
  };
68
68
  }
@@ -77,16 +77,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
77
77
  key: "avoid_use",
78
78
  title: "Avoid use of certain statements",
79
79
  shortDescription: `Detects usage of certain statements.`,
80
- extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
81
-
82
- Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
83
-
84
- STATICS: use CLASS-DATA instead
85
-
86
- DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
87
-
88
- TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
89
-
80
+ extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
81
+
82
+ Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
83
+
84
+ STATICS: use CLASS-DATA instead
85
+
86
+ DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
87
+
88
+ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
89
+
90
90
  BREAK points`,
91
91
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
92
92
  badExample: `DESCRIBE TABLE items LINES count.`,
@@ -57,11 +57,11 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
57
57
  title: "Check BEGIN END names",
58
58
  shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,
59
59
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
60
- badExample: `DATA: BEGIN OF stru,
61
- field TYPE i,
60
+ badExample: `DATA: BEGIN OF stru,
61
+ field TYPE i,
62
62
  END OF structure_not_the_same.`,
63
- goodExample: `DATA: BEGIN OF stru,
64
- field TYPE i,
63
+ goodExample: `DATA: BEGIN OF stru,
64
+ field TYPE i,
65
65
  END OF stru.`,
66
66
  };
67
67
  }
@@ -54,20 +54,20 @@ class BeginSingleInclude extends _abap_rule_1.ABAPRule {
54
54
  title: "BEGIN contains single INCLUDE",
55
55
  shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,
56
56
  tags: [_irule_1.RuleTag.SingleFile],
57
- badExample: `TYPES: BEGIN OF dummy1.
58
- INCLUDE TYPE dselc.
59
- TYPES: END OF dummy1.
60
-
61
- DATA BEGIN OF foo.
62
- INCLUDE STRUCTURE syst.
63
- DATA END OF foo.
64
-
65
- STATICS BEGIN OF bar.
66
- INCLUDE STRUCTURE syst.
57
+ badExample: `TYPES: BEGIN OF dummy1.
58
+ INCLUDE TYPE dselc.
59
+ TYPES: END OF dummy1.
60
+
61
+ DATA BEGIN OF foo.
62
+ INCLUDE STRUCTURE syst.
63
+ DATA END OF foo.
64
+
65
+ STATICS BEGIN OF bar.
66
+ INCLUDE STRUCTURE syst.
67
67
  STATICS END OF bar.`,
68
- goodExample: `DATA BEGIN OF foo.
69
- DATA field TYPE i.
70
- INCLUDE STRUCTURE dselc.
68
+ goodExample: `DATA BEGIN OF foo.
69
+ DATA field TYPE i.
70
+ INCLUDE STRUCTURE dselc.
71
71
  DATA END OF foo.`,
72
72
  };
73
73
  }
@@ -57,9 +57,9 @@ class CallTransactionAuthorityCheck extends _abap_rule_1.ABAPRule {
57
57
  extendedInformation: `https://docs.abapopenchecks.org/checks/54/`,
58
58
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
59
59
  badExample: `CALL TRANSACTION 'FOO'.`,
60
- goodExample: `TRY.
61
- CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
62
- CATCH cx_sy_authorization_error.
60
+ goodExample: `TRY.
61
+ CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
62
+ CATCH cx_sy_authorization_error.
63
63
  ENDTRY.`,
64
64
  };
65
65
  }
@@ -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.`,