@abaplint/core 2.110.4 → 2.110.5
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.
- package/README.md +6 -6
- package/build/adhoc/syntax_performance.js +165 -165
- package/build/src/abap/2_statements/expressions/type_table.js +1 -1
- package/build/src/abap/5_syntax/basic_types.js +1 -1
- package/build/src/abap/flow/flow_graph.js +7 -7
- package/build/src/lsp/help.js +7 -7
- package/build/src/registry.js +1 -1
- package/build/src/rules/7bit_ascii.js +4 -4
- package/build/src/rules/abapdoc.js +4 -4
- package/build/src/rules/align_parameters.js +40 -40
- package/build/src/rules/align_type_expressions.js +28 -28
- package/build/src/rules/ambiguous_statement.js +6 -6
- package/build/src/rules/avoid_use.js +10 -10
- package/build/src/rules/begin_end_names.js +4 -4
- package/build/src/rules/begin_single_include.js +13 -13
- package/build/src/rules/call_transaction_authority_check.js +3 -3
- package/build/src/rules/cds_comment_style.js +4 -4
- package/build/src/rules/cds_legacy_view.js +4 -4
- package/build/src/rules/chain_mainly_declarations.js +4 -4
- package/build/src/rules/change_if_to_case.js +8 -8
- package/build/src/rules/check_abstract.js +2 -2
- package/build/src/rules/check_comments.js +4 -4
- package/build/src/rules/check_include.js +3 -3
- package/build/src/rules/check_subrc.js +8 -8
- package/build/src/rules/classic_exceptions_overlap.js +10 -10
- package/build/src/rules/commented_code.js +1 -1
- package/build/src/rules/constructor_visibility_public.js +4 -4
- package/build/src/rules/contains_tab.js +2 -2
- package/build/src/rules/cyclic_oo.js +4 -4
- package/build/src/rules/dangerous_statement.js +1 -1
- package/build/src/rules/definitions_top.js +6 -6
- package/build/src/rules/downport.js +82 -82
- package/build/src/rules/easy_to_find_messages.js +6 -6
- package/build/src/rules/empty_line_in_statement.js +2 -2
- package/build/src/rules/empty_structure.js +6 -6
- package/build/src/rules/exit_or_check.js +3 -3
- package/build/src/rules/expand_macros.js +5 -5
- package/build/src/rules/exporting.js +1 -1
- package/build/src/rules/forbidden_identifier.js +1 -1
- package/build/src/rules/forbidden_void_type.js +2 -2
- package/build/src/rules/fully_type_itabs.js +1 -1
- package/build/src/rules/functional_writing.js +17 -17
- package/build/src/rules/global_class.js +8 -8
- package/build/src/rules/identical_conditions.js +12 -12
- package/build/src/rules/identical_contents.js +14 -14
- package/build/src/rules/identical_descriptions.js +6 -6
- package/build/src/rules/if_in_if.js +35 -35
- package/build/src/rules/implement_methods.js +3 -3
- package/build/src/rules/in_statement_indentation.js +11 -11
- package/build/src/rules/indentation.js +16 -16
- package/build/src/rules/intf_referencing_clas.js +3 -3
- package/build/src/rules/invalid_table_index.js +2 -2
- package/build/src/rules/line_break_style.js +2 -2
- package/build/src/rules/line_length.js +1 -1
- package/build/src/rules/line_only_punc.js +1 -1
- package/build/src/rules/local_variable_names.js +6 -6
- package/build/src/rules/main_file_contents.js +4 -4
- package/build/src/rules/many_parentheses.js +10 -10
- package/build/src/rules/max_one_method_parameter_per_line.js +7 -7
- package/build/src/rules/max_one_statement.js +5 -5
- package/build/src/rules/method_length.js +2 -2
- package/build/src/rules/method_overwrites_builtin.js +12 -12
- package/build/src/rules/mix_returning.js +6 -6
- package/build/src/rules/nesting.js +1 -1
- package/build/src/rules/no_chained_assignment.js +1 -1
- package/build/src/rules/no_external_form_calls.js +2 -2
- package/build/src/rules/no_inline_in_optional_branches.js +11 -11
- package/build/src/rules/no_prefixes.js +6 -6
- package/build/src/rules/no_public_attributes.js +1 -1
- package/build/src/rules/no_yoda_conditions.js +4 -4
- package/build/src/rules/nrob_consistency.js +2 -2
- package/build/src/rules/obsolete_statement.js +51 -51
- package/build/src/rules/omit_parameter_name.js +3 -3
- package/build/src/rules/omit_receiving.js +13 -13
- package/build/src/rules/parser_702_chaining.js +2 -2
- package/build/src/rules/parser_error.js +2 -2
- package/build/src/rules/parser_missing_space.js +1 -1
- package/build/src/rules/prefer_inline.js +16 -16
- package/build/src/rules/prefer_is_not.js +9 -9
- package/build/src/rules/prefer_raise_exception_new.js +5 -5
- package/build/src/rules/prefer_returning_to_exporting.js +4 -4
- package/build/src/rules/prefer_xsdbool.js +2 -2
- package/build/src/rules/preferred_compare_operator.js +2 -2
- package/build/src/rules/reduce_procedural_code.js +17 -17
- package/build/src/rules/remove_descriptions.js +4 -4
- package/build/src/rules/rfc_error_handling.js +7 -7
- package/build/src/rules/select_add_order_by.js +5 -5
- package/build/src/rules/select_performance.js +5 -5
- package/build/src/rules/select_single_full_key.js +2 -2
- package/build/src/rules/sicf_consistency.js +2 -2
- package/build/src/rules/slow_parameter_passing.js +16 -16
- package/build/src/rules/space_before_dot.js +2 -2
- package/build/src/rules/sql_value_conversion.js +6 -6
- package/build/src/rules/start_at_tab.js +1 -1
- package/build/src/rules/strict_sql.js +6 -6
- package/build/src/rules/sy_modification.js +3 -3
- package/build/src/rules/tabl_enhancement_category.js +2 -2
- package/build/src/rules/type_form_parameters.js +2 -2
- package/build/src/rules/unnecessary_pragma.js +29 -29
- package/build/src/rules/unnecessary_return.js +11 -11
- package/build/src/rules/unused_macros.js +6 -6
- package/build/src/rules/unused_methods.js +11 -11
- package/build/src/rules/unused_variables.js +12 -12
- package/build/src/rules/use_bool_expression.js +8 -8
- package/build/src/rules/use_class_based_exceptions.js +8 -8
- package/build/src/rules/use_line_exists.js +6 -6
- package/build/src/rules/use_new.js +4 -4
- package/build/src/rules/when_others_last.js +6 -6
- 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
|
|
@@ -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,");
|
|
@@ -14,7 +14,7 @@ class TypeTable extends combi_1.Expression {
|
|
|
14
14
|
const normal1 = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("STANDARD", "HASHED", "INDEX", "SORTED", "ANY")), "TABLE OF", (0, combi_1.optPrio)("REF TO"), _1.TypeName);
|
|
15
15
|
const likeType = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("STANDARD", "HASHED", "INDEX", "SORTED", "ANY")), "TABLE OF", (0, combi_1.optPrio)("REF TO"), (0, combi_1.opt)(field_chain_1.FieldChain), (0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))));
|
|
16
16
|
const rangeType = (0, combi_1.seq)("RANGE OF", _1.TypeName, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial));
|
|
17
|
-
const rangeLike = (0, combi_1.seq)("RANGE OF",
|
|
17
|
+
const rangeLike = (0, combi_1.seq)("RANGE OF", field_chain_1.FieldChain, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial));
|
|
18
18
|
// a maximum of 15 secondary table keys can be defined
|
|
19
19
|
// "WITH" is not allowed as a field name in keys
|
|
20
20
|
const typetable = (0, combi_1.alt)(generic, (0, combi_1.seq)(normal1, (0, combi_1.alt)((0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))), (0, combi_1.seq)((0, combi_1.plus)(type_table_key_1.TypeTableKey), (0, combi_1.optPrio)(initial)))));
|
|
@@ -402,7 +402,7 @@ class BasicTypes {
|
|
|
402
402
|
return new Types.TableType(structure, options, name);
|
|
403
403
|
}
|
|
404
404
|
else if (text.startsWith("LIKE RANGE OF ")) {
|
|
405
|
-
const sub = node.findFirstExpression(Expressions.
|
|
405
|
+
const sub = node.findFirstExpression(Expressions.FieldChain);
|
|
406
406
|
found = this.resolveLikeName(sub);
|
|
407
407
|
if (found === undefined) {
|
|
408
408
|
return new Types.UnknownType("LIKE RANGE OF, could not resolve type");
|
|
@@ -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) {
|
package/build/src/lsp/help.js
CHANGED
|
@@ -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) + ", " +
|
package/build/src/registry.js
CHANGED
|
@@ -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
|
};
|
|
@@ -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,15 +20,15 @@ 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
|
-
MODIFY TABLE foo FROM bar.
|
|
30
|
+
goodExample: `DELETE foo FROM @bar.
|
|
31
|
+
MODIFY TABLE foo FROM bar.
|
|
32
32
|
MODIFY zfoo FROM @wa.`,
|
|
33
33
|
};
|
|
34
34
|
}
|