@abaplint/core 2.113.71 → 2.113.73

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 (129) hide show
  1. package/README.md +6 -6
  2. package/build/abaplint.d.ts +12 -2
  3. package/build/src/abap/2_statements/expressions/color.js +1 -1
  4. package/build/src/abap/2_statements/expressions/data_definition.js +3 -1
  5. package/build/src/abap/2_statements/expressions/field_symbol.js +1 -1
  6. package/build/src/abap/2_statements/expressions/sql_hints.js +1 -1
  7. package/build/src/abap/2_statements/expressions/string_template_formatting.js +1 -1
  8. package/build/src/abap/2_statements/statements/get_property.js +1 -1
  9. package/build/src/abap/2_statements/statements/leave.js +1 -1
  10. package/build/src/abap/2_statements/statements/modify_entities.js +5 -3
  11. package/build/src/abap/2_statements/statements/modify_line.js +2 -1
  12. package/build/src/abap/2_statements/statements/read_entities.js +2 -1
  13. package/build/src/abap/2_statements/statements/scroll_list.js +1 -1
  14. package/build/src/abap/2_statements/statements/system_call.js +1 -1
  15. package/build/src/abap/2_statements/statements/while.js +1 -1
  16. package/build/src/abap/flow/flow_graph.js +7 -7
  17. package/build/src/abap/flow/statement_flow.js +1 -0
  18. package/build/src/ddic.js +3 -1
  19. package/build/src/lsp/help.js +10 -10
  20. package/build/src/objects/cds_type.js +21 -0
  21. package/build/src/objects/index.js +1 -0
  22. package/build/src/registry.js +1 -1
  23. package/build/src/rules/7bit_ascii.js +4 -4
  24. package/build/src/rules/abapdoc.js +4 -4
  25. package/build/src/rules/add_test_attributes.js +20 -20
  26. package/build/src/rules/align_parameters.js +40 -40
  27. package/build/src/rules/align_type_expressions.js +28 -28
  28. package/build/src/rules/ambiguous_statement.js +7 -7
  29. package/build/src/rules/avoid_use.js +10 -10
  30. package/build/src/rules/begin_end_names.js +4 -4
  31. package/build/src/rules/begin_single_include.js +13 -13
  32. package/build/src/rules/call_transaction_authority_check.js +3 -3
  33. package/build/src/rules/cds_comment_style.js +4 -4
  34. package/build/src/rules/cds_legacy_view.js +4 -4
  35. package/build/src/rules/chain_mainly_declarations.js +4 -4
  36. package/build/src/rules/change_if_to_case.js +8 -8
  37. package/build/src/rules/check_abstract.js +2 -2
  38. package/build/src/rules/check_comments.js +4 -4
  39. package/build/src/rules/check_include.js +3 -3
  40. package/build/src/rules/check_subrc.js +8 -8
  41. package/build/src/rules/classic_exceptions_overlap.js +10 -10
  42. package/build/src/rules/commented_code.js +1 -1
  43. package/build/src/rules/constructor_visibility_public.js +4 -4
  44. package/build/src/rules/contains_tab.js +2 -2
  45. package/build/src/rules/cyclic_oo.js +4 -4
  46. package/build/src/rules/dangerous_statement.js +1 -1
  47. package/build/src/rules/definitions_top.js +6 -6
  48. package/build/src/rules/downport.js +82 -82
  49. package/build/src/rules/easy_to_find_messages.js +6 -6
  50. package/build/src/rules/empty_event.js +6 -6
  51. package/build/src/rules/empty_line_in_statement.js +2 -2
  52. package/build/src/rules/empty_structure.js +6 -6
  53. package/build/src/rules/exit_or_check.js +3 -3
  54. package/build/src/rules/expand_macros.js +5 -5
  55. package/build/src/rules/exporting.js +1 -1
  56. package/build/src/rules/forbidden_identifier.js +1 -1
  57. package/build/src/rules/forbidden_void_type.js +2 -2
  58. package/build/src/rules/fully_type_itabs.js +2 -2
  59. package/build/src/rules/functional_writing.js +17 -17
  60. package/build/src/rules/global_class.js +8 -8
  61. package/build/src/rules/identical_conditions.js +12 -12
  62. package/build/src/rules/identical_contents.js +14 -14
  63. package/build/src/rules/identical_descriptions.js +6 -6
  64. package/build/src/rules/if_in_if.js +35 -35
  65. package/build/src/rules/implement_methods.js +3 -3
  66. package/build/src/rules/implicit_start_of_selection.js +5 -5
  67. package/build/src/rules/in_statement_indentation.js +11 -11
  68. package/build/src/rules/indentation.js +16 -16
  69. package/build/src/rules/intf_referencing_clas.js +3 -3
  70. package/build/src/rules/invalid_table_index.js +2 -2
  71. package/build/src/rules/line_break_style.js +2 -2
  72. package/build/src/rules/line_length.js +1 -1
  73. package/build/src/rules/line_only_punc.js +1 -1
  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/mix_returning.js +6 -6
  83. package/build/src/rules/nesting.js +1 -1
  84. package/build/src/rules/no_chained_assignment.js +1 -1
  85. package/build/src/rules/no_external_form_calls.js +2 -2
  86. package/build/src/rules/no_inline_in_optional_branches.js +11 -11
  87. package/build/src/rules/no_prefixes.js +6 -6
  88. package/build/src/rules/no_public_attributes.js +1 -1
  89. package/build/src/rules/no_yoda_conditions.js +4 -4
  90. package/build/src/rules/nrob_consistency.js +2 -2
  91. package/build/src/rules/obsolete_statement.js +51 -51
  92. package/build/src/rules/omit_parameter_name.js +3 -3
  93. package/build/src/rules/omit_receiving.js +13 -13
  94. package/build/src/rules/parser_702_chaining.js +2 -2
  95. package/build/src/rules/parser_error.js +2 -2
  96. package/build/src/rules/parser_missing_space.js +1 -1
  97. package/build/src/rules/prefer_inline.js +16 -16
  98. package/build/src/rules/prefer_is_not.js +9 -9
  99. package/build/src/rules/prefer_raise_exception_new.js +5 -5
  100. package/build/src/rules/prefer_returning_to_exporting.js +4 -4
  101. package/build/src/rules/prefer_xsdbool.js +2 -2
  102. package/build/src/rules/preferred_compare_operator.js +2 -2
  103. package/build/src/rules/reduce_procedural_code.js +17 -17
  104. package/build/src/rules/remove_descriptions.js +4 -4
  105. package/build/src/rules/rfc_error_handling.js +7 -7
  106. package/build/src/rules/select_add_order_by.js +5 -5
  107. package/build/src/rules/select_performance.js +5 -5
  108. package/build/src/rules/select_single_full_key.js +2 -2
  109. package/build/src/rules/sicf_consistency.js +2 -2
  110. package/build/src/rules/slow_parameter_passing.js +16 -16
  111. package/build/src/rules/space_before_dot.js +2 -2
  112. package/build/src/rules/sql_value_conversion.js +6 -6
  113. package/build/src/rules/start_at_tab.js +1 -1
  114. package/build/src/rules/strict_sql.js +6 -6
  115. package/build/src/rules/sy_modification.js +3 -3
  116. package/build/src/rules/tabl_enhancement_category.js +2 -2
  117. package/build/src/rules/tables_declared_locally.js +2 -2
  118. package/build/src/rules/type_form_parameters.js +2 -2
  119. package/build/src/rules/unnecessary_pragma.js +29 -29
  120. package/build/src/rules/unnecessary_return.js +11 -11
  121. package/build/src/rules/unused_macros.js +6 -6
  122. package/build/src/rules/unused_methods.js +12 -12
  123. package/build/src/rules/unused_variables.js +12 -12
  124. package/build/src/rules/use_bool_expression.js +8 -8
  125. package/build/src/rules/use_class_based_exceptions.js +8 -8
  126. package/build/src/rules/use_line_exists.js +6 -6
  127. package/build/src/rules/use_new.js +4 -4
  128. package/build/src/rules/when_others_last.js +6 -6
  129. package/package.json +70 -70
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
@@ -913,7 +913,16 @@ declare class CDSString extends Expression {
913
913
  getRunnable(): IStatementRunnable;
914
914
  }
915
915
 
916
- declare class CDSType extends Expression {
916
+ declare class CDSType extends AbstractObject {
917
+ getType(): string;
918
+ getAllowedNaming(): {
919
+ maxLength: number;
920
+ allowNamespace: boolean;
921
+ };
922
+ getDescription(): string | undefined;
923
+ }
924
+
925
+ declare class CDSType_2 extends Expression {
917
926
  getRunnable(): IStatementRunnable;
918
927
  }
919
928
 
@@ -2431,7 +2440,7 @@ declare namespace ExpressionsCDS {
2431
2440
  CDSSelect,
2432
2441
  CDSSource,
2433
2442
  CDSString,
2434
- CDSType,
2443
+ CDSType_2 as CDSType,
2435
2444
  CDSWhere,
2436
2445
  CDSWithParameters
2437
2446
  }
@@ -4851,6 +4860,7 @@ declare namespace Objects {
4851
4860
  BusinessObjectType,
4852
4861
  ParsedMetadataExtension,
4853
4862
  CDSMetadataExtension,
4863
+ CDSType,
4854
4864
  ChangeDocument,
4855
4865
  ChapterOfBookStructure,
4856
4866
  CheckpointGroup,
@@ -10,7 +10,7 @@ class Color extends combi_1.Expression {
10
10
  const texts = (0, combi_1.altPrio)("COL_BACKGROUND", "COL_HEADING", "COL_NORMAL", "COL_TOTAL", "COL_KEY", "COL_POSITIVE", "COL_NEGATIVE", "COL_GROUP");
11
11
  const value = (0, combi_1.alt)(eq, (0, combi_1.altPrio)("ON", "OFF", (0, combi_1.altPrio)(integers, texts)));
12
12
  const toggle = (0, combi_1.altPrio)("ON", "OFF");
13
- return (0, combi_1.seq)("COLOR", value, (0, combi_1.opt)(toggle));
13
+ return (0, combi_1.seq)("COLOR", (0, combi_1.opt)((0, combi_1.seq)(value, (0, combi_1.opt)(toggle))));
14
14
  }
15
15
  }
16
16
  exports.Color = Color;
@@ -3,11 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DataDefinition = void 0;
4
4
  const combi_1 = require("../combi");
5
5
  const Expressions = require(".");
6
+ const version_1 = require("../../../version");
6
7
  class DataDefinition extends combi_1.Expression {
7
8
  getRunnable() {
8
9
  const simple = (0, combi_1.opt)((0, combi_1.per)("READ-ONLY", Expressions.Type, Expressions.Length, Expressions.Decimals, Expressions.Value));
9
10
  const table = (0, combi_1.seq)(Expressions.TypeTable, (0, combi_1.optPrio)("READ-ONLY"));
10
- return (0, combi_1.seq)(Expressions.DefinitionName, (0, combi_1.optPrio)(Expressions.ConstantFieldLength), (0, combi_1.alt)(simple, table, Expressions.TypeStructure));
11
+ const boxed = (0, combi_1.ver)(version_1.Version.v702, "BOXED");
12
+ return (0, combi_1.seq)(Expressions.DefinitionName, (0, combi_1.optPrio)(Expressions.ConstantFieldLength), (0, combi_1.alt)(simple, table, Expressions.TypeStructure), (0, combi_1.optPrio)(boxed));
11
13
  }
12
14
  }
13
15
  exports.DataDefinition = DataDefinition;
@@ -7,7 +7,7 @@ class FieldSymbol extends combi_1.Expression {
7
7
  getRunnable() {
8
8
  // todo, this only allows one dash in the name
9
9
  const dashes = (0, combi_1.seq)((0, combi_1.regex)(/^<[\w\/%$\*]+$/), (0, combi_1.tok)(tokens_1.Dash), (0, combi_1.regex)(/^[\w\/%$\*]+>$/));
10
- return (0, combi_1.altPrio)((0, combi_1.regex)(/^<[\w\/%$\*]+>$/), dashes);
10
+ return (0, combi_1.altPrio)((0, combi_1.regex)(/^<[\w\/%$\*\?]+>$/), dashes);
11
11
  }
12
12
  }
13
13
  exports.FieldSymbol = FieldSymbol;
@@ -6,7 +6,7 @@ const _1 = require(".");
6
6
  class SQLHints extends combi_1.Expression {
7
7
  getRunnable() {
8
8
  const type = (0, combi_1.altPrio)("ORACLE", "ADABAS", "AS400", "DB2", "HDB", "MSSQLNT", "SYBASE", "DB6");
9
- const ret = (0, combi_1.seq)("%_HINTS", (0, combi_1.plus)((0, combi_1.seq)(type, _1.Constant)));
9
+ const ret = (0, combi_1.seq)("%_HINTS", (0, combi_1.plus)((0, combi_1.seq)(type, (0, combi_1.alt)(_1.Constant, _1.FieldSub))));
10
10
  return ret;
11
11
  }
12
12
  }
@@ -9,7 +9,7 @@ class StringTemplateFormatting extends combi_1.Expression {
9
9
  getRunnable() {
10
10
  // https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapcompute_string_format_options.htm
11
11
  const alphaOptions = (0, combi_1.altPrio)("OUT", "RAW", "IN", _1.Source);
12
- const alignOptions = (0, combi_1.altPrio)("LEFT", "RIGHT", "CENTER", _1.Source);
12
+ const alignOptions = (0, combi_1.altPrio)("LEFT", "RIGHT", "CENTER", _1.Source, dynamic_1.Dynamic);
13
13
  const dateTimeOptions = (0, combi_1.altPrio)("RAW", "ISO", "USER", "ENVIRONMENT", _1.Source, dynamic_1.Dynamic);
14
14
  const timeStampOptions = (0, combi_1.altPrio)("SPACE", "ISO", "USER", "ENVIRONMENT", _1.Source);
15
15
  const numberOptions = (0, combi_1.altPrio)("RAW", "USER", "ENVIRONMENT", _1.Source, dynamic_1.Dynamic);
@@ -6,7 +6,7 @@ const expressions_1 = require("../expressions");
6
6
  const version_1 = require("../../../version");
7
7
  class GetProperty {
8
8
  getMatcher() {
9
- const ret = (0, combi_1.seq)("GET PROPERTY OF", expressions_1.FieldSub, expressions_1.Source, "=", expressions_1.Source, (0, combi_1.opt)("NO FLUSH"), (0, combi_1.opt)(expressions_1.OLEExporting));
9
+ const ret = (0, combi_1.seq)("GET PROPERTY OF", expressions_1.FieldSub, expressions_1.Source, "=", expressions_1.Source, (0, combi_1.opt)("NO FLUSH"), (0, combi_1.opt)("QUEUEONLY"), (0, combi_1.opt)(expressions_1.OLEExporting));
10
10
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
11
11
  }
12
12
  }
@@ -8,7 +8,7 @@ class Leave {
8
8
  getMatcher() {
9
9
  const retu = (0, combi_1.seq)(expressions_1.AndReturn, "TO SCREEN", expressions_1.Source);
10
10
  const transaction = (0, combi_1.seq)("TO TRANSACTION", expressions_1.Source, (0, combi_1.opt)("AND SKIP FIRST SCREEN"));
11
- const ret = (0, combi_1.seq)("LEAVE", (0, combi_1.opt)((0, combi_1.alt)("TO CURRENT TRANSACTION", (0, combi_1.seq)((0, combi_1.opt)("TO"), "LIST-PROCESSING", (0, combi_1.opt)(retu)), "LIST-PROCESSING", "SCREEN", transaction, "PROGRAM", (0, combi_1.seq)("TO SCREEN", expressions_1.Source))));
11
+ const ret = (0, combi_1.seq)("LEAVE", (0, combi_1.opt)((0, combi_1.alt)((0, combi_1.seq)("TO CURRENT TRANSACTION", (0, combi_1.opt)("AND SKIP FIRST SCREEN")), (0, combi_1.seq)((0, combi_1.opt)("TO"), "LIST-PROCESSING", (0, combi_1.opt)(retu)), "LIST-PROCESSING", "SCREEN", transaction, "PROGRAM", (0, combi_1.seq)("TO SCREEN", expressions_1.Source))));
12
12
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
13
13
  }
14
14
  }
@@ -6,15 +6,17 @@ const expressions_1 = require("../expressions");
6
6
  const version_1 = require("../../../version");
7
7
  class ModifyEntities {
8
8
  getMatcher() {
9
- const fieldsWith = (0, combi_1.seq)("FIELDS (", (0, combi_1.plus)(expressions_1.SimpleName), ") WITH", expressions_1.Source);
10
- const operation = (0, combi_1.alt)((0, combi_1.seq)("UPDATE SET FIELDS WITH", expressions_1.Source), (0, combi_1.seq)("CREATE SET FIELDS WITH", expressions_1.Source), (0, combi_1.seq)("UPDATE", fieldsWith), (0, combi_1.seq)("DELETE FROM", expressions_1.Source), (0, combi_1.seq)("EXECUTE", expressions_1.SimpleName, "FROM", expressions_1.Source), (0, combi_1.seq)("CREATE", (0, combi_1.optPrio)("AUTO FILL CID"), fieldsWith));
9
+ const withh = (0, combi_1.seq)("WITH", expressions_1.Source);
10
+ const fieldsWith = (0, combi_1.seq)("FIELDS (", (0, combi_1.plus)(expressions_1.SimpleName), ")", withh);
11
+ const by = (0, combi_1.seq)("BY", expressions_1.AssociationName);
12
+ const operation = (0, combi_1.alt)((0, combi_1.seq)("UPDATE SET FIELDS WITH", expressions_1.Source), (0, combi_1.seq)("CREATE SET FIELDS WITH", expressions_1.Source), (0, combi_1.seq)("UPDATE", fieldsWith), (0, combi_1.seq)("DELETE FROM", expressions_1.Source), (0, combi_1.seq)("CREATE", (0, combi_1.opt)(by), "FROM", expressions_1.Source), (0, combi_1.seq)("EXECUTE", expressions_1.SimpleName, "FROM", expressions_1.Source), (0, combi_1.seq)("CREATE", (0, combi_1.opt)(by), (0, combi_1.optPrio)("AUTO FILL CID"), (0, combi_1.altPrio)(withh, fieldsWith)));
11
13
  const failed = (0, combi_1.seq)("FAILED", expressions_1.Target);
12
14
  const result = (0, combi_1.seq)("RESULT", expressions_1.Target);
13
15
  const mapped = (0, combi_1.seq)("MAPPED", expressions_1.Target);
14
16
  const reported = (0, combi_1.seq)("REPORTED", expressions_1.Target);
15
17
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
16
18
  const execute = (0, combi_1.seq)("EXECUTE", expressions_1.NamespaceSimpleName);
17
- const entities = (0, combi_1.seq)("ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.plusPrio)((0, combi_1.seq)("ENTITY", expressions_1.SimpleName, operation)), (0, combi_1.optPrio)((0, combi_1.per)(failed, result, mapped, reported)));
19
+ const entities = (0, combi_1.seq)("ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.plusPrio)((0, combi_1.seq)("ENTITY", expressions_1.SimpleName, (0, combi_1.plus)(operation))), (0, combi_1.optPrio)((0, combi_1.per)(failed, result, mapped, reported)));
18
20
  const entity = (0, combi_1.seq)("ENTITY", expressions_1.NamespaceSimpleName, execute, from, mapped, failed, reported);
19
21
  return (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("MODIFY", (0, combi_1.alt)(entities, entity)));
20
22
  }
@@ -16,8 +16,9 @@ class ModifyLine {
16
16
  const index = (0, combi_1.seq)("INDEX", expressions_1.Source);
17
17
  const page = (0, combi_1.seq)("OF PAGE", expressions_1.Source);
18
18
  const ocp = (0, combi_1.str)("OF CURRENT PAGE");
19
- const lineFormat = (0, combi_1.seq)("LINE FORMAT", (0, combi_1.per)("INPUT OFF", "INVERSE", "RESET", "INTENSIFIED", expressions_1.Color));
20
19
  const intensified = (0, combi_1.seq)("INTENSIFIED", onOff);
20
+ const intensifiedOpt = (0, combi_1.seq)("INTENSIFIED", (0, combi_1.opt)(onOff));
21
+ const lineFormat = (0, combi_1.seq)("LINE FORMAT", (0, combi_1.per)("INPUT OFF", "INVERSE", "RESET", intensifiedOpt, expressions_1.Color));
21
22
  const options = (0, combi_1.per)(index, value, format, page, lineFormat, lineValue, ocp, intensified, expressions_1.Color);
22
23
  const ret = (0, combi_1.seq)("MODIFY", (0, combi_1.altPrio)("CURRENT LINE", (0, combi_1.seq)("LINE", expressions_1.Source)), (0, combi_1.opt)(options));
23
24
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
@@ -10,7 +10,8 @@ class ReadEntities {
10
10
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
11
11
  const fields = (0, combi_1.seq)("FIELDS", (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.plus)(expressions_1.SimpleName), (0, combi_1.tok)(tokens_1.WParenRightW), "WITH", expressions_1.Source);
12
12
  const all = (0, combi_1.seq)("ALL FIELDS WITH", expressions_1.Source);
13
- const s = (0, combi_1.seq)("READ ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), "ENTITY", expressions_1.SimpleName, (0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.AssociationName)), (0, combi_1.alt)(fields, from, all), (0, combi_1.optPrio)((0, combi_1.seq)("RESULT", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("LINK", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("FAILED", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("REPORTED", expressions_1.Target)));
13
+ const entity = (0, combi_1.seq)("ENTITY", expressions_1.SimpleName, (0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.AssociationName)), (0, combi_1.alt)(fields, from, all), (0, combi_1.optPrio)((0, combi_1.seq)("RESULT", expressions_1.Target)));
14
+ const s = (0, combi_1.seq)("READ ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.plus)(entity), (0, combi_1.optPrio)((0, combi_1.seq)("LINK", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("FAILED", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("REPORTED", expressions_1.Target)));
14
15
  return (0, combi_1.ver)(version_1.Version.v754, s);
15
16
  }
16
17
  }
@@ -10,7 +10,7 @@ class ScrollList {
10
10
  const line = (0, combi_1.seq)("LINE", expressions_1.Source);
11
11
  const column = (0, combi_1.seq)("TO COLUMN", expressions_1.Source);
12
12
  const to = (0, combi_1.seq)("TO", (0, combi_1.alt)("FIRST PAGE", "LAST PAGE", (0, combi_1.seq)("PAGE", expressions_1.Source)));
13
- const ret = (0, combi_1.seq)("SCROLL LIST", (0, combi_1.per)(index, (0, combi_1.alt)(to, "BACKWARD", "FORWARD"), (0, combi_1.alt)("LEFT", "RIGHT"), column, line));
13
+ const ret = (0, combi_1.seq)("SCROLL LIST", (0, combi_1.per)(index, (0, combi_1.alt)(to, "BACKWARD", "FORWARD"), (0, combi_1.seq)((0, combi_1.alt)("LEFT", "RIGHT"), (0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.Source, "PLACES"))), column, line));
14
14
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
15
15
  }
16
16
  }
@@ -9,7 +9,7 @@ class SystemCall {
9
9
  getMatcher() {
10
10
  const anyy = (0, combi_1.regex)(/^.+$/);
11
11
  const objmgr = (0, combi_1.seq)("OBJMGR CLONE", source_1.Source, "TO", target_1.Target);
12
- const did = (0, combi_1.seq)(anyy, "DID", source_1.Source, "PARAMETERS", source_1.Source, source_1.Source, source_1.Source);
12
+ const did = (0, combi_1.seq)(anyy, "DID", source_1.Source, "PARAMETERS", (0, combi_1.plus)(source_1.Source));
13
13
  const ret = (0, combi_1.seq)("SYSTEM-CALL", (0, combi_1.altPrio)(objmgr, did, (0, combi_1.plus)(anyy)));
14
14
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
15
15
  }
@@ -6,7 +6,7 @@ const expressions_1 = require("../expressions");
6
6
  class While {
7
7
  getMatcher() {
8
8
  const vary = (0, combi_1.seq)("VARY", expressions_1.Target, "FROM", expressions_1.Source, "NEXT", expressions_1.Source);
9
- return (0, combi_1.seq)("WHILE", expressions_1.Cond, (0, combi_1.opt)(vary));
9
+ return (0, combi_1.seq)("WHILE", expressions_1.Cond, (0, combi_1.star)(vary));
10
10
  }
11
11
  }
12
12
  exports.While = While;
@@ -94,13 +94,13 @@ class FlowGraph {
94
94
  this.label = label;
95
95
  }
96
96
  toDigraph() {
97
- return `digraph G {
98
- labelloc="t";
99
- label="${this.label}";
100
- graph [fontname = "helvetica"];
101
- node [fontname = "helvetica", shape="box"];
102
- edge [fontname = "helvetica"];
103
- ${this.toTextEdges()}
97
+ return `digraph G {
98
+ labelloc="t";
99
+ label="${this.label}";
100
+ graph [fontname = "helvetica"];
101
+ node [fontname = "helvetica", shape="box"];
102
+ edge [fontname = "helvetica"];
103
+ ${this.toTextEdges()}
104
104
  }`;
105
105
  }
106
106
  listSources(node) {
@@ -221,6 +221,7 @@ class StatementFlow {
221
221
  || type instanceof Structures.With
222
222
  || type instanceof Structures.Provide
223
223
  || type instanceof Structures.Select
224
+ || type instanceof Structures.EnhancementSection
224
225
  || type instanceof Structures.LoopAtScreen
225
226
  || type instanceof Structures.Do) {
226
227
  const loopName = StatementFlow.buildName(n.getFirstStatement());
package/build/src/ddic.js CHANGED
@@ -316,6 +316,7 @@ class DDIC {
316
316
  case "DEC": // 1 <= len <= 31
317
317
  case "D16F": // 1 <= len <= 31
318
318
  case "D16D":
319
+ case "D34D":
319
320
  case "D34F": // 1 <= len <= 31
320
321
  case "DF16_DEC": // 1 <= len <= 31
321
322
  case "DF34_DEC": // 1 <= len <= 31
@@ -338,6 +339,7 @@ class DDIC {
338
339
  return new Types.CharacterType(5, extra);
339
340
  case "UNIT": // 2 <= len <= 3
340
341
  return new Types.CharacterType(3, extra);
342
+ case "UTCL":
341
343
  case "UTCLONG":
342
344
  return new Types.CharacterType(27, extra);
343
345
  case "NUMC": // 1 <= len <= 255
@@ -397,7 +399,7 @@ class DDIC {
397
399
  case "VARC":
398
400
  return new Types.UnknownType(input.text + " is an obsolete data type", input.infoText);
399
401
  default:
400
- return new Types.UnknownType(input.text + " unknown", input.infoText);
402
+ return new Types.UnknownType(input.text + " unknown basic ddic type", input.infoText);
401
403
  }
402
404
  }
403
405
  }
@@ -20,13 +20,13 @@ class Help {
20
20
  /////////////////////////////////////////////////
21
21
  static dumpABAP(file, reg, textDocument, position) {
22
22
  let content = "";
23
- content = `
24
- <a href="#_tokens" rel="no-refresh">Tokens</a> |
25
- <a href="#_statements" rel="no-refresh">Statements</a> |
26
- <a href="#_structure" rel="no-refresh">Structure</a> |
27
- <a href="#_files" rel="no-refresh">Files</a> |
28
- <a href="#_info" rel="no-refresh">Info Dump</a>
29
- <hr>
23
+ content = `
24
+ <a href="#_tokens" rel="no-refresh">Tokens</a> |
25
+ <a href="#_statements" rel="no-refresh">Statements</a> |
26
+ <a href="#_structure" rel="no-refresh">Structure</a> |
27
+ <a href="#_files" rel="no-refresh">Files</a> |
28
+ <a href="#_info" rel="no-refresh">Info Dump</a>
29
+ <hr>
30
30
  ` +
31
31
  "<tt>" + textDocument.uri + " (" +
32
32
  (position.line + 1) + ", " +
@@ -181,9 +181,9 @@ class Help {
181
181
  return ret + "</ul>";
182
182
  }
183
183
  static tokens(file) {
184
- let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
185
- <td><b>Row</b></td><td><b>Column</b></td>
186
- <td><b>vRow</b></td><td><b>vColumn</b></td>
184
+ let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
185
+ <td><b>Row</b></td><td><b>Column</b></td>
186
+ <td><b>vRow</b></td><td><b>vColumn</b></td>
187
187
  </tr>`;
188
188
  for (const token of file.getTokens()) {
189
189
  const tStart = token.getStart();
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CDSType = void 0;
4
+ const _abstract_object_1 = require("./_abstract_object");
5
+ class CDSType extends _abstract_object_1.AbstractObject {
6
+ getType() {
7
+ return "DRTY";
8
+ }
9
+ getAllowedNaming() {
10
+ return {
11
+ maxLength: 30,
12
+ allowNamespace: true,
13
+ };
14
+ }
15
+ getDescription() {
16
+ // todo
17
+ return undefined;
18
+ }
19
+ }
20
+ exports.CDSType = CDSType;
21
+ //# sourceMappingURL=cds_type.js.map
@@ -41,6 +41,7 @@ __exportStar(require("./business_function_set_assignment"), exports);
41
41
  __exportStar(require("./business_object_model"), exports);
42
42
  __exportStar(require("./business_object_type"), exports);
43
43
  __exportStar(require("./cds_metadata_extension"), exports);
44
+ __exportStar(require("./cds_type"), exports);
44
45
  __exportStar(require("./change_document"), exports);
45
46
  __exportStar(require("./chapter_of_book_structure"), exports);
46
47
  __exportStar(require("./checkpoint_group"), exports);
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.71";
70
+ return "2.113.73";
71
71
  }
72
72
  getDDICReferences() {
73
73
  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
  };
@@ -21,27 +21,27 @@ class AddTestAttributes extends _abap_rule_1.ABAPRule {
21
21
  title: "Add test attributes for tests classes with test methods",
22
22
  shortDescription: `Add test attributes DURATION and RISK LEVEL for tests classes with test methods`,
23
23
  tags: [_irule_1.RuleTag.SingleFile],
24
- badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
25
- PUBLIC SECTION.
26
- PROTECTED SECTION.
27
- PRIVATE SECTION.
28
- METHODS test FOR TESTING RAISING cx_static_check.
29
- ENDCLASS.
30
-
31
- CLASS ltcl_test1 IMPLEMENTATION.
32
- METHOD test.
33
- ENDMETHOD.
24
+ badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
25
+ PUBLIC SECTION.
26
+ PROTECTED SECTION.
27
+ PRIVATE SECTION.
28
+ METHODS test FOR TESTING RAISING cx_static_check.
29
+ ENDCLASS.
30
+
31
+ CLASS ltcl_test1 IMPLEMENTATION.
32
+ METHOD test.
33
+ ENDMETHOD.
34
34
  ENDCLASS.`,
35
- goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
36
- PUBLIC SECTION.
37
- PROTECTED SECTION.
38
- PRIVATE SECTION.
39
- METHODS test FOR TESTING RAISING cx_static_check.
40
- ENDCLASS.
41
-
42
- CLASS ltcl_test2 IMPLEMENTATION.
43
- METHOD test.
44
- ENDMETHOD.
35
+ goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
36
+ PUBLIC SECTION.
37
+ PROTECTED SECTION.
38
+ PRIVATE SECTION.
39
+ METHODS test FOR TESTING RAISING cx_static_check.
40
+ ENDCLASS.
41
+
42
+ CLASS ltcl_test2 IMPLEMENTATION.
43
+ METHOD test.
44
+ ENDMETHOD.
45
45
  ENDCLASS.`,
46
46
  };
47
47
  }
@@ -22,49 +22,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
22
22
  key: "align_parameters",
23
23
  title: "Align Parameters",
24
24
  shortDescription: `Checks for vertially aligned parameters`,
25
- extendedInformation: `Checks:
26
- * function module calls
27
- * method calls
28
- * VALUE constructors
29
- * NEW constructors
30
- * RAISE EXCEPTION statements
31
- * CREATE OBJECT statements
32
- * RAISE EVENT statements
33
-
34
- https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
35
-
36
- Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
37
-
38
- If parameters are on the same row, no issues are reported, see
25
+ extendedInformation: `Checks:
26
+ * function module calls
27
+ * method calls
28
+ * VALUE constructors
29
+ * NEW constructors
30
+ * RAISE EXCEPTION statements
31
+ * CREATE OBJECT statements
32
+ * RAISE EVENT statements
33
+
34
+ https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
35
+
36
+ Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
37
+
38
+ If parameters are on the same row, no issues are reported, see
39
39
  https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
40
40
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
41
- badExample: `CALL FUNCTION 'FOOBAR'
42
- EXPORTING
43
- foo = 2
44
- parameter = 3.
45
-
46
- foobar( moo = 1
47
- param = 1 ).
48
-
49
- foo = VALUE #(
50
- foo = bar
41
+ badExample: `CALL FUNCTION 'FOOBAR'
42
+ EXPORTING
43
+ foo = 2
44
+ parameter = 3.
45
+
46
+ foobar( moo = 1
47
+ param = 1 ).
48
+
49
+ foo = VALUE #(
50
+ foo = bar
51
51
  moo = 2 ).`,
52
- goodExample: `CALL FUNCTION 'FOOBAR'
53
- EXPORTING
54
- foo = 2
55
- parameter = 3.
56
-
57
- foobar( moo = 1
58
- param = 1 ).
59
-
60
- foo = VALUE #(
61
- foo = bar
62
- moo = 2 ).
63
-
64
- DATA(sdf) = VALUE type(
65
- common_val = 2
66
- another_common = 5
67
- ( row_value = 4
52
+ goodExample: `CALL FUNCTION 'FOOBAR'
53
+ EXPORTING
54
+ foo = 2
55
+ parameter = 3.
56
+
57
+ foobar( moo = 1
58
+ param = 1 ).
59
+
60
+ foo = VALUE #(
61
+ foo = bar
62
+ moo = 2 ).
63
+
64
+ DATA(sdf) = VALUE type(
65
+ common_val = 2
66
+ another_common = 5
67
+ ( row_value = 4
68
68
  value_foo = 5 ) ).`,
69
69
  };
70
70
  }
@@ -30,37 +30,37 @@ class AlignTypeExpressions extends _abap_rule_1.ABAPRule {
30
30
  key: "align_type_expressions",
31
31
  title: "Align TYPE expressions",
32
32
  shortDescription: `Align TYPE expressions in statements`,
33
- extendedInformation: `
34
- Currently works for METHODS + BEGIN OF
35
-
36
- If BEGIN OF has an INCLUDE TYPE its ignored
37
-
38
- Also note that clean ABAP does not recommend aligning TYPE clauses:
33
+ extendedInformation: `
34
+ Currently works for METHODS + BEGIN OF
35
+
36
+ If BEGIN OF has an INCLUDE TYPE its ignored
37
+
38
+ Also note that clean ABAP does not recommend aligning TYPE clauses:
39
39
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-align-type-clauses`,
40
40
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix],
41
- badExample: `
42
- TYPES: BEGIN OF foo,
43
- bar TYPE i,
44
- foobar TYPE i,
45
- END OF foo.
46
-
47
- INTERFACE lif.
48
- METHODS bar
49
- IMPORTING
50
- foo TYPE i
51
- foobar TYPE i.
41
+ badExample: `
42
+ TYPES: BEGIN OF foo,
43
+ bar TYPE i,
44
+ foobar TYPE i,
45
+ END OF foo.
46
+
47
+ INTERFACE lif.
48
+ METHODS bar
49
+ IMPORTING
50
+ foo TYPE i
51
+ foobar TYPE i.
52
52
  ENDINTERFACE.`,
53
- goodExample: `
54
- TYPES: BEGIN OF foo,
55
- bar TYPE i,
56
- foobar TYPE i,
57
- END OF foo.
58
-
59
- INTERFACE lif.
60
- METHODS bar
61
- IMPORTING
62
- foo TYPE i
63
- foobar TYPE i.
53
+ goodExample: `
54
+ TYPES: BEGIN OF foo,
55
+ bar TYPE i,
56
+ foobar TYPE i,
57
+ END OF foo.
58
+
59
+ INTERFACE lif.
60
+ METHODS bar
61
+ IMPORTING
62
+ foo TYPE i
63
+ foobar TYPE i.
64
64
  ENDINTERFACE.`,
65
65
  };
66
66
  }
@@ -20,16 +20,16 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
20
20
  return {
21
21
  key: "ambiguous_statement",
22
22
  title: "Check for ambigious statements",
23
- shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
24
- Add "TABLE" keyword or "@" for escaping SQL variables
25
-
23
+ shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
24
+ Add "TABLE" keyword or "@" for escaping SQL variables
25
+
26
26
  Only works if the target version is 740sp05 or above`,
27
27
  tags: [_irule_1.RuleTag.SingleFile],
28
- badExample: `DELETE foo FROM bar.
28
+ badExample: `DELETE foo FROM bar.
29
29
  MODIFY foo FROM bar.`,
30
- goodExample: `DELETE foo FROM @bar.
31
- DELETE TABLE itab FROM 2.
32
- MODIFY zfoo FROM @wa.
30
+ goodExample: `DELETE foo FROM @bar.
31
+ DELETE TABLE itab FROM 2.
32
+ MODIFY zfoo FROM @wa.
33
33
  MODIFY TABLE foo FROM bar.`,
34
34
  };
35
35
  }
@@ -44,16 +44,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
44
44
  key: "avoid_use",
45
45
  title: "Avoid use of certain statements",
46
46
  shortDescription: `Detects usage of certain statements.`,
47
- extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
48
-
49
- Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
50
-
51
- STATICS: use CLASS-DATA instead
52
-
53
- DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
54
-
55
- TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
56
-
47
+ extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
48
+
49
+ Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
50
+
51
+ STATICS: use CLASS-DATA instead
52
+
53
+ DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
54
+
55
+ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
56
+
57
57
  BREAK points`,
58
58
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
59
59
  };