@abaplint/core 2.108.6 → 2.108.8

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 (110) hide show
  1. package/README.md +6 -6
  2. package/build/abaplint.d.ts +14 -0
  3. package/build/adhoc/syntax_performance.js +165 -165
  4. package/build/src/abap/5_syntax/_type_utils.js +10 -0
  5. package/build/src/abap/flow/flow_graph.js +7 -7
  6. package/build/src/lsp/help.js +7 -7
  7. package/build/src/objects/enhancement_implementation.js +29 -2
  8. package/build/src/objects/extension_index.js +35 -2
  9. package/build/src/registry.js +1 -1
  10. package/build/src/rules/7bit_ascii.js +4 -4
  11. package/build/src/rules/abapdoc.js +4 -4
  12. package/build/src/rules/align_parameters.js +40 -40
  13. package/build/src/rules/align_type_expressions.js +28 -28
  14. package/build/src/rules/ambiguous_statement.js +6 -6
  15. package/build/src/rules/avoid_use.js +10 -10
  16. package/build/src/rules/begin_end_names.js +4 -4
  17. package/build/src/rules/begin_single_include.js +13 -13
  18. package/build/src/rules/call_transaction_authority_check.js +3 -3
  19. package/build/src/rules/cds_comment_style.js +4 -4
  20. package/build/src/rules/cds_legacy_view.js +4 -4
  21. package/build/src/rules/chain_mainly_declarations.js +4 -4
  22. package/build/src/rules/change_if_to_case.js +8 -8
  23. package/build/src/rules/check_abstract.js +2 -2
  24. package/build/src/rules/check_comments.js +4 -4
  25. package/build/src/rules/check_include.js +3 -3
  26. package/build/src/rules/check_subrc.js +8 -8
  27. package/build/src/rules/classic_exceptions_overlap.js +10 -10
  28. package/build/src/rules/commented_code.js +1 -1
  29. package/build/src/rules/constructor_visibility_public.js +4 -4
  30. package/build/src/rules/contains_tab.js +2 -2
  31. package/build/src/rules/cyclic_oo.js +4 -4
  32. package/build/src/rules/dangerous_statement.js +1 -1
  33. package/build/src/rules/definitions_top.js +6 -6
  34. package/build/src/rules/downport.js +82 -82
  35. package/build/src/rules/easy_to_find_messages.js +6 -6
  36. package/build/src/rules/empty_line_in_statement.js +2 -2
  37. package/build/src/rules/empty_structure.js +6 -6
  38. package/build/src/rules/exit_or_check.js +3 -3
  39. package/build/src/rules/expand_macros.js +5 -5
  40. package/build/src/rules/exporting.js +1 -1
  41. package/build/src/rules/forbidden_identifier.js +1 -1
  42. package/build/src/rules/forbidden_void_type.js +2 -2
  43. package/build/src/rules/fully_type_itabs.js +1 -1
  44. package/build/src/rules/functional_writing.js +17 -17
  45. package/build/src/rules/global_class.js +8 -8
  46. package/build/src/rules/identical_conditions.js +12 -12
  47. package/build/src/rules/identical_contents.js +14 -14
  48. package/build/src/rules/identical_descriptions.js +6 -6
  49. package/build/src/rules/if_in_if.js +35 -35
  50. package/build/src/rules/implement_methods.js +3 -3
  51. package/build/src/rules/in_statement_indentation.js +11 -11
  52. package/build/src/rules/indentation.js +16 -16
  53. package/build/src/rules/intf_referencing_clas.js +3 -3
  54. package/build/src/rules/invalid_table_index.js +2 -2
  55. package/build/src/rules/line_break_style.js +2 -2
  56. package/build/src/rules/line_length.js +1 -1
  57. package/build/src/rules/line_only_punc.js +1 -1
  58. package/build/src/rules/local_variable_names.js +6 -6
  59. package/build/src/rules/main_file_contents.js +4 -4
  60. package/build/src/rules/many_parentheses.js +10 -10
  61. package/build/src/rules/max_one_method_parameter_per_line.js +7 -7
  62. package/build/src/rules/max_one_statement.js +5 -5
  63. package/build/src/rules/method_length.js +2 -2
  64. package/build/src/rules/method_overwrites_builtin.js +12 -12
  65. package/build/src/rules/mix_returning.js +6 -6
  66. package/build/src/rules/nesting.js +1 -1
  67. package/build/src/rules/no_chained_assignment.js +1 -1
  68. package/build/src/rules/no_external_form_calls.js +2 -2
  69. package/build/src/rules/no_inline_in_optional_branches.js +11 -11
  70. package/build/src/rules/no_prefixes.js +6 -6
  71. package/build/src/rules/no_public_attributes.js +1 -1
  72. package/build/src/rules/no_yoda_conditions.js +4 -4
  73. package/build/src/rules/nrob_consistency.js +2 -2
  74. package/build/src/rules/obsolete_statement.js +51 -51
  75. package/build/src/rules/omit_parameter_name.js +3 -3
  76. package/build/src/rules/omit_receiving.js +13 -13
  77. package/build/src/rules/parser_702_chaining.js +2 -2
  78. package/build/src/rules/parser_error.js +2 -2
  79. package/build/src/rules/parser_missing_space.js +1 -1
  80. package/build/src/rules/prefer_inline.js +16 -16
  81. package/build/src/rules/prefer_is_not.js +9 -9
  82. package/build/src/rules/prefer_raise_exception_new.js +5 -5
  83. package/build/src/rules/prefer_returning_to_exporting.js +4 -4
  84. package/build/src/rules/prefer_xsdbool.js +2 -2
  85. package/build/src/rules/preferred_compare_operator.js +2 -2
  86. package/build/src/rules/reduce_procedural_code.js +17 -17
  87. package/build/src/rules/remove_descriptions.js +4 -4
  88. package/build/src/rules/rfc_error_handling.js +9 -9
  89. package/build/src/rules/select_add_order_by.js +5 -5
  90. package/build/src/rules/select_performance.js +5 -5
  91. package/build/src/rules/select_single_full_key.js +2 -2
  92. package/build/src/rules/sicf_consistency.js +2 -2
  93. package/build/src/rules/slow_parameter_passing.js +16 -16
  94. package/build/src/rules/space_before_dot.js +2 -2
  95. package/build/src/rules/sql_value_conversion.js +6 -6
  96. package/build/src/rules/start_at_tab.js +1 -1
  97. package/build/src/rules/strict_sql.js +6 -6
  98. package/build/src/rules/sy_modification.js +3 -3
  99. package/build/src/rules/tabl_enhancement_category.js +2 -2
  100. package/build/src/rules/type_form_parameters.js +2 -2
  101. package/build/src/rules/unnecessary_pragma.js +29 -29
  102. package/build/src/rules/unnecessary_return.js +11 -11
  103. package/build/src/rules/unused_methods.js +11 -11
  104. package/build/src/rules/unused_variables.js +12 -12
  105. package/build/src/rules/use_bool_expression.js +8 -8
  106. package/build/src/rules/use_class_based_exceptions.js +8 -8
  107. package/build/src/rules/use_line_exists.js +6 -6
  108. package/build/src/rules/use_new.js +4 -4
  109. package/build/src/rules/when_others_last.js +6 -6
  110. 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
@@ -1968,12 +1968,19 @@ declare enum EnhancementCategory {
1968
1968
  }
1969
1969
 
1970
1970
  declare class EnhancementImplementation extends AbstractObject {
1971
+ private parsedXML;
1971
1972
  getType(): string;
1973
+ setDirty(): void;
1972
1974
  getAllowedNaming(): {
1973
1975
  maxLength: number;
1974
1976
  allowNamespace: boolean;
1975
1977
  };
1978
+ getClassName(): string | undefined;
1976
1979
  getDescription(): string | undefined;
1980
+ parse(): {
1981
+ updated: boolean;
1982
+ runtime: number;
1983
+ };
1977
1984
  }
1978
1985
 
1979
1986
  declare class EnhancementPoint implements IStatement {
@@ -2360,12 +2367,19 @@ declare namespace ExpressionsCDS {
2360
2367
  export { ExpressionsCDS }
2361
2368
 
2362
2369
  declare class ExtensionIndex extends AbstractObject {
2370
+ private parsedXML;
2363
2371
  getType(): string;
2364
2372
  getAllowedNaming(): {
2365
2373
  maxLength: number;
2366
2374
  allowNamespace: boolean;
2367
2375
  };
2376
+ setDirty(): void;
2368
2377
  getDescription(): string | undefined;
2378
+ getTableName(): string | undefined;
2379
+ parse(): {
2380
+ updated: boolean;
2381
+ runtime: number;
2382
+ };
2369
2383
  }
2370
2384
 
2371
2385
  declare class Extract_2 implements IStatement {
@@ -5,175 +5,175 @@ const fs = require("fs");
5
5
  console.log("========================");
6
6
  const file1 = new src_1.MemoryFile("abapgit.prog.abap", fs.readFileSync("./lexer_performance.abap", "utf-8"));
7
7
  const reg = new src_1.Registry().addFile(file1);
8
- reg.addFile(new src_1.MemoryFile("cx_root.clas.abap", `
9
- CLASS cx_root DEFINITION ABSTRACT PUBLIC.
10
- PUBLIC SECTION.
11
- DATA previous TYPE REF TO cx_root.
12
- DATA textid TYPE c LENGTH 32.
13
-
14
- METHODS constructor
15
- IMPORTING
16
- textid LIKE textid OPTIONAL
17
- previous TYPE REF TO cx_root OPTIONAL.
18
-
19
- METHODS get_source_position
20
- EXPORTING
21
- program_name TYPE string
22
- include_name TYPE string
23
- source_line TYPE i.
24
-
25
- INTERFACES if_message.
26
- ALIASES get_longtext FOR if_message~get_longtext.
27
- ALIASES get_text FOR if_message~get_text.
28
-
29
- ENDCLASS.
30
-
31
- CLASS cx_root IMPLEMENTATION.
32
-
33
- METHOD constructor.
34
- ENDMETHOD.
35
-
36
- METHOD get_source_position.
37
- ENDMETHOD.
38
-
39
- METHOD if_message~get_longtext.
40
- ENDMETHOD.
41
-
42
- METHOD if_message~get_text.
43
- ENDMETHOD.
44
-
8
+ reg.addFile(new src_1.MemoryFile("cx_root.clas.abap", `
9
+ CLASS cx_root DEFINITION ABSTRACT PUBLIC.
10
+ PUBLIC SECTION.
11
+ DATA previous TYPE REF TO cx_root.
12
+ DATA textid TYPE c LENGTH 32.
13
+
14
+ METHODS constructor
15
+ IMPORTING
16
+ textid LIKE textid OPTIONAL
17
+ previous TYPE REF TO cx_root OPTIONAL.
18
+
19
+ METHODS get_source_position
20
+ EXPORTING
21
+ program_name TYPE string
22
+ include_name TYPE string
23
+ source_line TYPE i.
24
+
25
+ INTERFACES if_message.
26
+ ALIASES get_longtext FOR if_message~get_longtext.
27
+ ALIASES get_text FOR if_message~get_text.
28
+
29
+ ENDCLASS.
30
+
31
+ CLASS cx_root IMPLEMENTATION.
32
+
33
+ METHOD constructor.
34
+ ENDMETHOD.
35
+
36
+ METHOD get_source_position.
37
+ ENDMETHOD.
38
+
39
+ METHOD if_message~get_longtext.
40
+ ENDMETHOD.
41
+
42
+ METHOD if_message~get_text.
43
+ ENDMETHOD.
44
+
45
45
  ENDCLASS.`));
46
- reg.addFile(new src_1.MemoryFile("cx_static_check.clas.abap", `
47
- CLASS cx_static_check DEFINITION PUBLIC INHERITING FROM cx_root.
48
- PUBLIC SECTION.
49
- METHODS constructor
50
- IMPORTING
51
- textid LIKE textid OPTIONAL
52
- previous TYPE REF TO cx_root OPTIONAL.
53
- ENDCLASS.
54
-
55
- CLASS cx_static_check IMPLEMENTATION.
56
- METHOD constructor.
57
- ENDMETHOD.
46
+ reg.addFile(new src_1.MemoryFile("cx_static_check.clas.abap", `
47
+ CLASS cx_static_check DEFINITION PUBLIC INHERITING FROM cx_root.
48
+ PUBLIC SECTION.
49
+ METHODS constructor
50
+ IMPORTING
51
+ textid LIKE textid OPTIONAL
52
+ previous TYPE REF TO cx_root OPTIONAL.
53
+ ENDCLASS.
54
+
55
+ CLASS cx_static_check IMPLEMENTATION.
56
+ METHOD constructor.
57
+ ENDMETHOD.
58
58
  ENDCLASS.`));
59
- reg.addFile(new src_1.MemoryFile("if_message.intf.abap", `
60
- INTERFACE if_message PUBLIC.
61
- METHODS get_text RETURNING VALUE(result) TYPE string.
62
-
63
- METHODS get_longtext
64
- IMPORTING preserve_newlines TYPE abap_bool OPTIONAL
65
- RETURNING VALUE(result) TYPE string.
59
+ reg.addFile(new src_1.MemoryFile("if_message.intf.abap", `
60
+ INTERFACE if_message PUBLIC.
61
+ METHODS get_text RETURNING VALUE(result) TYPE string.
62
+
63
+ METHODS get_longtext
64
+ IMPORTING preserve_newlines TYPE abap_bool OPTIONAL
65
+ RETURNING VALUE(result) TYPE string.
66
66
  ENDINTERFACE.`));
67
- reg.addFile(new src_1.MemoryFile("if_t100_message.intf.abap", `
68
- INTERFACE if_t100_message PUBLIC.
69
-
70
- DATA t100key TYPE scx_t100key.
71
-
72
- CONSTANTS:
73
- BEGIN OF default_textid,
74
- msgid TYPE symsgid VALUE 'AB',
75
- msgno TYPE symsgno VALUE '123',
76
- attr1 TYPE scx_attrname VALUE '',
77
- attr2 TYPE scx_attrname VALUE '',
78
- attr3 TYPE scx_attrname VALUE '',
79
- attr4 TYPE scx_attrname VALUE '',
80
- END OF default_textid.
81
-
67
+ reg.addFile(new src_1.MemoryFile("if_t100_message.intf.abap", `
68
+ INTERFACE if_t100_message PUBLIC.
69
+
70
+ DATA t100key TYPE scx_t100key.
71
+
72
+ CONSTANTS:
73
+ BEGIN OF default_textid,
74
+ msgid TYPE symsgid VALUE 'AB',
75
+ msgno TYPE symsgno VALUE '123',
76
+ attr1 TYPE scx_attrname VALUE '',
77
+ attr2 TYPE scx_attrname VALUE '',
78
+ attr3 TYPE scx_attrname VALUE '',
79
+ attr4 TYPE scx_attrname VALUE '',
80
+ END OF default_textid.
81
+
82
82
  ENDINTERFACE.`));
83
- reg.setConfig(new src_1.Config(`
84
- {
85
- "global": {
86
- "files": "/src/**/*.*"
87
- },
88
- "dependencies": [],
89
- "syntax": {
90
- "version": "v702",
91
- "errorNamespace": "^(Z|Y|LCL_|TY_|LIF_)",
92
- "globalConstants": [
93
- "abap_func_exporting",
94
- "abap_func_tables",
95
- "cssf_formtype_text",
96
- "icon_abap",
97
- "icon_adopt",
98
- "icon_change",
99
- "icon_create",
100
- "icon_delete",
101
- "icon_display_text",
102
- "icon_folder",
103
- "icon_led_green",
104
- "icon_led_inactive",
105
- "icon_led_red",
106
- "icon_led_yellow",
107
- "icon_message_information",
108
- "icon_okay",
109
- "icon_set_state",
110
- "icon_stack",
111
- "icon_system_help",
112
- "icon_workflow_fork",
113
- "seoc_category_exception",
114
- "seoc_category_webdynpro_class",
115
- "seoc_exposure_private",
116
- "seoc_exposure_protected",
117
- "seoc_exposure_public",
118
- "seoc_state_implemented",
119
- "seoc_version_active",
120
- "seoc_version_deleted",
121
- "seoc_version_inactive",
122
- "seok_access_free",
123
- "seok_access_modify",
124
- "seox_false",
125
- "seok_pgmid_r3tr",
126
- "seoo_cmptype_type",
127
- "seoo_cmptype_event",
128
- "seoo_cmptype_method",
129
- "seoo_cmptype_attribute",
130
- "seop_ext_class_locals_def",
131
- "seop_ext_class_locals_imp",
132
- "seop_ext_class_macros",
133
- "seop_ext_class_testclasses",
134
- "seop_incextapp_definition",
135
- "seop_incextapp_implementation",
136
- "seop_incextapp_macros",
137
- "seop_incextapp_testclasses",
138
- "seos_scotype_exception",
139
- "seos_scotype_parameter",
140
- "seox_true",
141
- "sews_c_vif_version",
142
- "skwfc_obtype_folder",
143
- "skwfc_obtype_loio",
144
- "so2_controller",
145
- "icon_no_status",
146
- "icon_package_standard",
147
- "srext_ext_class_pool",
148
- "srext_ext_interface_pool",
149
- "ststc_c_type_dialog",
150
- "ststc_c_type_object",
151
- "ststc_c_type_parameters",
152
- "ststc_c_type_report",
153
- "swbm_c_op_delete_no_dialog",
154
- "swbm_c_type_ddic_db_tabxinx",
155
- "swbm_c_type_wdy_application",
156
- "swbm_version_active",
157
- "swbm_version_inactive",
158
- "wbmr_c_skwf_folder_class",
159
- "wdyn_limu_component_controller",
160
- "wdyn_limu_component_definition",
161
- "wdyn_limu_component_view"
162
- ]
163
- },
164
- "rules": {
165
- "begin_end_names": true,
166
- "check_ddic": true,
167
- "check_include": true,
168
- "check_syntax": true,
169
- "global_class": true,
170
- "implement_methods": true,
171
- "method_implemented_twice": true,
172
- "parser_error": true,
173
- "superclass_final": true,
174
- "unknown_types": true,
175
- "xml_consistency": true
176
- }
83
+ reg.setConfig(new src_1.Config(`
84
+ {
85
+ "global": {
86
+ "files": "/src/**/*.*"
87
+ },
88
+ "dependencies": [],
89
+ "syntax": {
90
+ "version": "v702",
91
+ "errorNamespace": "^(Z|Y|LCL_|TY_|LIF_)",
92
+ "globalConstants": [
93
+ "abap_func_exporting",
94
+ "abap_func_tables",
95
+ "cssf_formtype_text",
96
+ "icon_abap",
97
+ "icon_adopt",
98
+ "icon_change",
99
+ "icon_create",
100
+ "icon_delete",
101
+ "icon_display_text",
102
+ "icon_folder",
103
+ "icon_led_green",
104
+ "icon_led_inactive",
105
+ "icon_led_red",
106
+ "icon_led_yellow",
107
+ "icon_message_information",
108
+ "icon_okay",
109
+ "icon_set_state",
110
+ "icon_stack",
111
+ "icon_system_help",
112
+ "icon_workflow_fork",
113
+ "seoc_category_exception",
114
+ "seoc_category_webdynpro_class",
115
+ "seoc_exposure_private",
116
+ "seoc_exposure_protected",
117
+ "seoc_exposure_public",
118
+ "seoc_state_implemented",
119
+ "seoc_version_active",
120
+ "seoc_version_deleted",
121
+ "seoc_version_inactive",
122
+ "seok_access_free",
123
+ "seok_access_modify",
124
+ "seox_false",
125
+ "seok_pgmid_r3tr",
126
+ "seoo_cmptype_type",
127
+ "seoo_cmptype_event",
128
+ "seoo_cmptype_method",
129
+ "seoo_cmptype_attribute",
130
+ "seop_ext_class_locals_def",
131
+ "seop_ext_class_locals_imp",
132
+ "seop_ext_class_macros",
133
+ "seop_ext_class_testclasses",
134
+ "seop_incextapp_definition",
135
+ "seop_incextapp_implementation",
136
+ "seop_incextapp_macros",
137
+ "seop_incextapp_testclasses",
138
+ "seos_scotype_exception",
139
+ "seos_scotype_parameter",
140
+ "seox_true",
141
+ "sews_c_vif_version",
142
+ "skwfc_obtype_folder",
143
+ "skwfc_obtype_loio",
144
+ "so2_controller",
145
+ "icon_no_status",
146
+ "icon_package_standard",
147
+ "srext_ext_class_pool",
148
+ "srext_ext_interface_pool",
149
+ "ststc_c_type_dialog",
150
+ "ststc_c_type_object",
151
+ "ststc_c_type_parameters",
152
+ "ststc_c_type_report",
153
+ "swbm_c_op_delete_no_dialog",
154
+ "swbm_c_type_ddic_db_tabxinx",
155
+ "swbm_c_type_wdy_application",
156
+ "swbm_version_active",
157
+ "swbm_version_inactive",
158
+ "wbmr_c_skwf_folder_class",
159
+ "wdyn_limu_component_controller",
160
+ "wdyn_limu_component_definition",
161
+ "wdyn_limu_component_view"
162
+ ]
163
+ },
164
+ "rules": {
165
+ "begin_end_names": true,
166
+ "check_ddic": true,
167
+ "check_include": true,
168
+ "check_syntax": true,
169
+ "global_class": true,
170
+ "implement_methods": true,
171
+ "method_implemented_twice": true,
172
+ "parser_error": true,
173
+ "superclass_final": true,
174
+ "unknown_types": true,
175
+ "xml_consistency": true
176
+ }
177
177
  }`));
178
178
  reg.parse();
179
179
  console.log("run syntax logic,");
@@ -366,6 +366,16 @@ class TypeUtils {
366
366
  return false;
367
367
  }
368
368
  }
369
+ else if (source instanceof basic_1.TableType) {
370
+ if (target instanceof basic_1.TableType) {
371
+ return this.isAssignableStrict(source.getRowType(), target.getRowType());
372
+ }
373
+ else if (target instanceof basic_1.UnknownType
374
+ || target instanceof basic_1.AnyType
375
+ || target instanceof basic_1.VoidType) {
376
+ return true;
377
+ }
378
+ }
369
379
  return this.isAssignable(source, target);
370
380
  }
371
381
  isAssignable(source, target) {
@@ -84,13 +84,13 @@ class FlowGraph {
84
84
  this.label = label;
85
85
  }
86
86
  toDigraph() {
87
- return `digraph G {
88
- labelloc="t";
89
- label="${this.label}";
90
- graph [fontname = "helvetica"];
91
- node [fontname = "helvetica", shape="box"];
92
- edge [fontname = "helvetica"];
93
- ${this.toTextEdges()}
87
+ return `digraph G {
88
+ labelloc="t";
89
+ label="${this.label}";
90
+ graph [fontname = "helvetica"];
91
+ node [fontname = "helvetica", shape="box"];
92
+ edge [fontname = "helvetica"];
93
+ ${this.toTextEdges()}
94
94
  }`;
95
95
  }
96
96
  listSources(node) {
@@ -19,13 +19,13 @@ class Help {
19
19
  /////////////////////////////////////////////////
20
20
  static dumpABAP(file, reg, textDocument, position) {
21
21
  let content = "";
22
- content = `
23
- <a href="#_tokens" rel="no-refresh">Tokens</a> |
24
- <a href="#_statements" rel="no-refresh">Statements</a> |
25
- <a href="#_structure" rel="no-refresh">Structure</a> |
26
- <a href="#_files" rel="no-refresh">Files</a> |
27
- <a href="#_info" rel="no-refresh">Info Dump</a>
28
- <hr>
22
+ content = `
23
+ <a href="#_tokens" rel="no-refresh">Tokens</a> |
24
+ <a href="#_statements" rel="no-refresh">Statements</a> |
25
+ <a href="#_structure" rel="no-refresh">Structure</a> |
26
+ <a href="#_files" rel="no-refresh">Files</a> |
27
+ <a href="#_info" rel="no-refresh">Info Dump</a>
28
+ <hr>
29
29
  ` +
30
30
  "<tt>" + textDocument.uri + " (" +
31
31
  (position.line + 1) + ", " +
@@ -6,15 +6,42 @@ class EnhancementImplementation extends _abstract_object_1.AbstractObject {
6
6
  getType() {
7
7
  return "ENHO";
8
8
  }
9
+ setDirty() {
10
+ this.parsedXML = undefined;
11
+ super.setDirty();
12
+ }
9
13
  getAllowedNaming() {
10
14
  return {
11
15
  maxLength: 30,
12
16
  allowNamespace: true,
13
17
  };
14
18
  }
19
+ getClassName() {
20
+ var _a;
21
+ this.parse();
22
+ return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.className;
23
+ }
15
24
  getDescription() {
16
- // todo
17
- return undefined;
25
+ var _a;
26
+ this.parse();
27
+ return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.description;
28
+ }
29
+ parse() {
30
+ if (this.parsedXML) {
31
+ return { updated: false, runtime: 0 };
32
+ }
33
+ const start = Date.now();
34
+ this.parsedXML = {};
35
+ const parsed = super.parseRaw2();
36
+ if (parsed === undefined
37
+ || parsed.abapGit === undefined
38
+ || parsed.abapGit["asx:abap"]["asx:values"] === undefined) {
39
+ return { updated: false, runtime: 0 };
40
+ }
41
+ this.parsedXML.className = parsed.abapGit["asx:abap"]["asx:values"].CLASS;
42
+ this.parsedXML.description = parsed.abapGit["asx:abap"]["asx:values"].SHORTTEXT;
43
+ const end = Date.now();
44
+ return { updated: true, runtime: end - start };
18
45
  }
19
46
  }
20
47
  exports.EnhancementImplementation = EnhancementImplementation;
@@ -3,6 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ExtensionIndex = void 0;
4
4
  const _abstract_object_1 = require("./_abstract_object");
5
5
  class ExtensionIndex extends _abstract_object_1.AbstractObject {
6
+ constructor() {
7
+ super(...arguments);
8
+ this.parsedXML = undefined;
9
+ }
6
10
  getType() {
7
11
  return "XINX";
8
12
  }
@@ -12,9 +16,38 @@ class ExtensionIndex extends _abstract_object_1.AbstractObject {
12
16
  allowNamespace: true,
13
17
  };
14
18
  }
19
+ setDirty() {
20
+ this.parsedXML = undefined;
21
+ super.setDirty();
22
+ }
15
23
  getDescription() {
16
- // todo
17
- return undefined;
24
+ var _a;
25
+ this.parse();
26
+ return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.ddtext;
27
+ }
28
+ getTableName() {
29
+ var _a;
30
+ this.parse();
31
+ return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.sqltab;
32
+ }
33
+ parse() {
34
+ var _a, _b, _c, _d, _e;
35
+ if (this.parsedXML !== undefined) {
36
+ return { updated: false, runtime: 0 };
37
+ }
38
+ const start = Date.now();
39
+ this.parsedXML = {};
40
+ const parsed = super.parseRaw2();
41
+ if (parsed === undefined) {
42
+ return { updated: false, runtime: 0 };
43
+ }
44
+ const xinx = (_c = (_b = (_a = parsed.abapGit) === null || _a === void 0 ? void 0 : _a["asx:abap"]) === null || _b === void 0 ? void 0 : _b["asx:values"]) === null || _c === void 0 ? void 0 : _c.XINX;
45
+ this.parsedXML = {
46
+ sqltab: (_d = xinx === null || xinx === void 0 ? void 0 : xinx.DD12V) === null || _d === void 0 ? void 0 : _d.SQLTAB,
47
+ ddtext: (_e = xinx === null || xinx === void 0 ? void 0 : xinx.DD12V) === null || _e === void 0 ? void 0 : _e.DDTEXT,
48
+ };
49
+ const end = Date.now();
50
+ return { updated: true, runtime: end - start };
18
51
  }
19
52
  }
20
53
  exports.ExtensionIndex = ExtensionIndex;
@@ -65,7 +65,7 @@ class Registry {
65
65
  }
66
66
  static abaplintVersion() {
67
67
  // magic, see build script "version.sh"
68
- return "2.108.6";
68
+ return "2.108.8";
69
69
  }
70
70
  getDDICReferences() {
71
71
  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
  };