@abaplint/core 2.113.85 → 2.113.86
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/src/abap/2_statements/statements/assign.js +1 -1
- package/build/src/abap/2_statements/statements/call_ole.js +1 -1
- package/build/src/abap/2_statements/statements/get_property.js +1 -1
- package/build/src/abap/2_statements/statements/modify_line.js +1 -1
- package/build/src/abap/2_statements/statements/scroll_list.js +2 -1
- package/build/src/abap/5_syntax/statements/loop.js +1 -5
- package/build/src/abap/flow/flow_graph.js +7 -7
- package/build/src/lsp/help.js +10 -10
- package/build/src/objects/_abap_object.js +4 -1
- 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/add_test_attributes.js +20 -20
- 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 +7 -7
- 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_event.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 +2 -2
- 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/implicit_start_of_selection.js +5 -5
- 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/macro_naming.js +2 -2
- 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/tables_declared_locally.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 +12 -12
- 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
|
@@ -18,12 +18,12 @@ class SQLValueConversion {
|
|
|
18
18
|
key: "sql_value_conversion",
|
|
19
19
|
title: "Implicit SQL Value Conversion",
|
|
20
20
|
shortDescription: `Ensure types match when selecting from database`,
|
|
21
|
-
extendedInformation: `
|
|
22
|
-
* Integer to CHAR conversion
|
|
23
|
-
* Integer to NUMC conversion
|
|
24
|
-
* NUMC to Integer conversion
|
|
25
|
-
* CHAR to Integer conversion
|
|
26
|
-
* Source field longer than database field, CHAR -> CHAR
|
|
21
|
+
extendedInformation: `
|
|
22
|
+
* Integer to CHAR conversion
|
|
23
|
+
* Integer to NUMC conversion
|
|
24
|
+
* NUMC to Integer conversion
|
|
25
|
+
* CHAR to Integer conversion
|
|
26
|
+
* Source field longer than database field, CHAR -> CHAR
|
|
27
27
|
* Source field longer than database field, NUMC -> NUMC`,
|
|
28
28
|
tags: [],
|
|
29
29
|
};
|
|
@@ -20,7 +20,7 @@ class StartAtTab extends _abap_rule_1.ABAPRule {
|
|
|
20
20
|
key: "start_at_tab",
|
|
21
21
|
title: "Start at tab",
|
|
22
22
|
shortDescription: `Checks that statements start at tabstops.`,
|
|
23
|
-
extendedInformation: `Reports max 100 issues per file
|
|
23
|
+
extendedInformation: `Reports max 100 issues per file
|
|
24
24
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
|
|
25
25
|
tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
26
26
|
badExample: ` WRITE a.`,
|
|
@@ -22,12 +22,12 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
|
|
|
22
22
|
key: "strict_sql",
|
|
23
23
|
title: "Strict SQL",
|
|
24
24
|
shortDescription: `Strict SQL`,
|
|
25
|
-
extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
|
|
26
|
-
|
|
27
|
-
https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
|
|
28
|
-
|
|
29
|
-
Also see separate rule sql_escape_host_variables
|
|
30
|
-
|
|
25
|
+
extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
|
|
26
|
+
|
|
27
|
+
https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
|
|
28
|
+
|
|
29
|
+
Also see separate rule sql_escape_host_variables
|
|
30
|
+
|
|
31
31
|
Activates from v750 and up`,
|
|
32
32
|
tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix],
|
|
33
33
|
badExample: `SELECT * FROM ztabl INTO TABLE @rt_content WHERE type = @iv_type ORDER BY PRIMARY KEY.`,
|
|
@@ -19,11 +19,11 @@ class SyModification extends _abap_rule_1.ABAPRule {
|
|
|
19
19
|
key: "sy_modification",
|
|
20
20
|
title: "Modification of SY fields",
|
|
21
21
|
shortDescription: `Finds modification of sy fields`,
|
|
22
|
-
extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
|
|
23
|
-
|
|
22
|
+
extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
|
|
23
|
+
|
|
24
24
|
Changes to SY-TVAR* fields are not reported`,
|
|
25
25
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
26
|
-
badExample: `sy-uname = 2.
|
|
26
|
+
badExample: `sy-uname = 2.
|
|
27
27
|
sy = sy.`,
|
|
28
28
|
};
|
|
29
29
|
}
|
|
@@ -17,8 +17,8 @@ class TABLEnhancementCategory {
|
|
|
17
17
|
key: "tabl_enhancement_category",
|
|
18
18
|
title: "TABL enhancement category must be set",
|
|
19
19
|
shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,
|
|
20
|
-
extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
|
|
21
|
-
|
|
20
|
+
extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
|
|
21
|
+
|
|
22
22
|
You may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,
|
|
23
23
|
tags: [],
|
|
24
24
|
};
|
|
@@ -22,8 +22,8 @@ class TablesDeclaredLocally extends _abap_rule_1.ABAPRule {
|
|
|
22
22
|
shortDescription: `TABLES are always global, so declare them globally`,
|
|
23
23
|
extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abaptables.htm`,
|
|
24
24
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
25
|
-
badExample: `FORM foo.
|
|
26
|
-
TABLES t100.
|
|
25
|
+
badExample: `FORM foo.
|
|
26
|
+
TABLES t100.
|
|
27
27
|
ENDFORM.`,
|
|
28
28
|
goodExample: `TABLES t000.`,
|
|
29
29
|
};
|
|
@@ -21,9 +21,9 @@ class TypeFormParameters extends _abap_rule_1.ABAPRule {
|
|
|
21
21
|
title: "Type FORM parameters",
|
|
22
22
|
shortDescription: `Checks for untyped FORM parameters`,
|
|
23
23
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
24
|
-
badExample: `FORM foo USING bar.
|
|
24
|
+
badExample: `FORM foo USING bar.
|
|
25
25
|
ENDFORM.`,
|
|
26
|
-
goodExample: `FORM foo USING bar TYPE string.
|
|
26
|
+
goodExample: `FORM foo USING bar TYPE string.
|
|
27
27
|
ENDFORM.`,
|
|
28
28
|
};
|
|
29
29
|
}
|
|
@@ -28,38 +28,38 @@ class UnnecessaryPragma extends _abap_rule_1.ABAPRule {
|
|
|
28
28
|
key: "unnecessary_pragma",
|
|
29
29
|
title: "Unnecessary Pragma",
|
|
30
30
|
shortDescription: `Finds pragmas which can be removed`,
|
|
31
|
-
extendedInformation: `* NO_HANDLER with handler
|
|
32
|
-
|
|
33
|
-
* NEEDED without definition
|
|
34
|
-
|
|
35
|
-
* NO_TEXT without texts
|
|
36
|
-
|
|
37
|
-
* SUBRC_OK where sy-subrc is checked
|
|
38
|
-
|
|
31
|
+
extendedInformation: `* NO_HANDLER with handler
|
|
32
|
+
|
|
33
|
+
* NEEDED without definition
|
|
34
|
+
|
|
35
|
+
* NO_TEXT without texts
|
|
36
|
+
|
|
37
|
+
* SUBRC_OK where sy-subrc is checked
|
|
38
|
+
|
|
39
39
|
NO_HANDLER inside macros are not checked`,
|
|
40
40
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
41
|
-
badExample: `TRY.
|
|
42
|
-
...
|
|
43
|
-
CATCH zcx_abapgit_exception ##NO_HANDLER.
|
|
44
|
-
RETURN. " it has a handler
|
|
45
|
-
ENDTRY.
|
|
46
|
-
MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
|
|
47
|
-
SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
|
|
48
|
-
IF sy-subrc <> 0.
|
|
41
|
+
badExample: `TRY.
|
|
42
|
+
...
|
|
43
|
+
CATCH zcx_abapgit_exception ##NO_HANDLER.
|
|
44
|
+
RETURN. " it has a handler
|
|
45
|
+
ENDTRY.
|
|
46
|
+
MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
|
|
47
|
+
SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
|
|
48
|
+
IF sy-subrc <> 0.
|
|
49
49
|
ENDIF.`,
|
|
50
|
-
goodExample: `TRY.
|
|
51
|
-
...
|
|
52
|
-
CATCH zcx_abapgit_exception.
|
|
53
|
-
RETURN.
|
|
54
|
-
ENDTRY.
|
|
55
|
-
MESSAGE w125(zbar) WITH c_foo INTO message.
|
|
56
|
-
SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
|
|
57
|
-
IF sy-subrc <> 0.
|
|
58
|
-
ENDIF.
|
|
59
|
-
|
|
60
|
-
DATA: BEGIN OF blah ##NEEDED,
|
|
61
|
-
test1 TYPE string,
|
|
62
|
-
test2 TYPE string,
|
|
50
|
+
goodExample: `TRY.
|
|
51
|
+
...
|
|
52
|
+
CATCH zcx_abapgit_exception.
|
|
53
|
+
RETURN.
|
|
54
|
+
ENDTRY.
|
|
55
|
+
MESSAGE w125(zbar) WITH c_foo INTO message.
|
|
56
|
+
SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
|
|
57
|
+
IF sy-subrc <> 0.
|
|
58
|
+
ENDIF.
|
|
59
|
+
|
|
60
|
+
DATA: BEGIN OF blah ##NEEDED,
|
|
61
|
+
test1 TYPE string,
|
|
62
|
+
test2 TYPE string,
|
|
63
63
|
END OF blah.`,
|
|
64
64
|
};
|
|
65
65
|
}
|
|
@@ -28,18 +28,18 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
|
|
|
28
28
|
shortDescription: `Finds unnecessary RETURN statements`,
|
|
29
29
|
extendedInformation: `Finds unnecessary RETURN statements`,
|
|
30
30
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
31
|
-
badExample: `FORM hello1.
|
|
32
|
-
WRITE 'world'.
|
|
33
|
-
RETURN.
|
|
34
|
-
ENDFORM.
|
|
35
|
-
|
|
36
|
-
FORM foo.
|
|
37
|
-
IF 1 = 2.
|
|
38
|
-
RETURN.
|
|
39
|
-
ENDIF.
|
|
31
|
+
badExample: `FORM hello1.
|
|
32
|
+
WRITE 'world'.
|
|
33
|
+
RETURN.
|
|
34
|
+
ENDFORM.
|
|
35
|
+
|
|
36
|
+
FORM foo.
|
|
37
|
+
IF 1 = 2.
|
|
38
|
+
RETURN.
|
|
39
|
+
ENDIF.
|
|
40
40
|
ENDFORM.`,
|
|
41
|
-
goodExample: `FORM hello2.
|
|
42
|
-
WRITE 'world'.
|
|
41
|
+
goodExample: `FORM hello2.
|
|
42
|
+
WRITE 'world'.
|
|
43
43
|
ENDFORM.`,
|
|
44
44
|
};
|
|
45
45
|
}
|
|
@@ -26,13 +26,13 @@ class UnusedMacros {
|
|
|
26
26
|
title: "Unused macros",
|
|
27
27
|
shortDescription: `Checks for unused macro definitions definitions`,
|
|
28
28
|
tags: [_irule_1.RuleTag.Quickfix],
|
|
29
|
-
badExample: `DEFINE foobar1.
|
|
30
|
-
WRITE 'hello'.
|
|
29
|
+
badExample: `DEFINE foobar1.
|
|
30
|
+
WRITE 'hello'.
|
|
31
31
|
END-OF-DEFINITION.`,
|
|
32
|
-
goodExample: `DEFINE foobar2.
|
|
33
|
-
WRITE 'hello'.
|
|
34
|
-
END-OF-DEFINITION.
|
|
35
|
-
|
|
32
|
+
goodExample: `DEFINE foobar2.
|
|
33
|
+
WRITE 'hello'.
|
|
34
|
+
END-OF-DEFINITION.
|
|
35
|
+
|
|
36
36
|
foobar2.`,
|
|
37
37
|
};
|
|
38
38
|
}
|
|
@@ -60,18 +60,18 @@ class UnusedMethods {
|
|
|
60
60
|
key: "unused_methods",
|
|
61
61
|
title: "Unused methods",
|
|
62
62
|
shortDescription: `Checks for unused methods`,
|
|
63
|
-
extendedInformation: `Checks private and protected methods.
|
|
64
|
-
|
|
65
|
-
Unused methods are not reported if the object contains parser or syntax errors.
|
|
66
|
-
Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
|
|
67
|
-
|
|
68
|
-
Skips:
|
|
69
|
-
* methods FOR TESTING
|
|
70
|
-
* methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
|
|
71
|
-
* class_constructor + constructor methods
|
|
72
|
-
* event handlers
|
|
73
|
-
* methods that are redefined
|
|
74
|
-
* INCLUDEs
|
|
63
|
+
extendedInformation: `Checks private and protected methods.
|
|
64
|
+
|
|
65
|
+
Unused methods are not reported if the object contains parser or syntax errors.
|
|
66
|
+
Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
|
|
67
|
+
|
|
68
|
+
Skips:
|
|
69
|
+
* methods FOR TESTING
|
|
70
|
+
* methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
|
|
71
|
+
* class_constructor + constructor methods
|
|
72
|
+
* event handlers
|
|
73
|
+
* methods that are redefined
|
|
74
|
+
* INCLUDEs
|
|
75
75
|
`,
|
|
76
76
|
tags: [_irule_1.RuleTag.Quickfix],
|
|
77
77
|
pragma: "##CALLED",
|
|
@@ -66,23 +66,23 @@ class UnusedVariables {
|
|
|
66
66
|
key: "unused_variables",
|
|
67
67
|
title: "Unused variables",
|
|
68
68
|
shortDescription: `Checks for unused variables and constants`,
|
|
69
|
-
extendedInformation: `Skips event parameters.
|
|
70
|
-
|
|
71
|
-
Note that this currently does not work if the source code uses macros.
|
|
72
|
-
|
|
73
|
-
Unused variables are not reported if the object contains parser or syntax errors.
|
|
74
|
-
|
|
69
|
+
extendedInformation: `Skips event parameters.
|
|
70
|
+
|
|
71
|
+
Note that this currently does not work if the source code uses macros.
|
|
72
|
+
|
|
73
|
+
Unused variables are not reported if the object contains parser or syntax errors.
|
|
74
|
+
|
|
75
75
|
Errors found in INCLUDES are reported for the main program.`,
|
|
76
76
|
tags: [_irule_1.RuleTag.Quickfix],
|
|
77
77
|
pragma: "##NEEDED",
|
|
78
78
|
pseudoComment: "EC NEEDED",
|
|
79
|
-
badExample: `DATA: BEGIN OF blah1,
|
|
80
|
-
test TYPE string,
|
|
81
|
-
test2 TYPE string,
|
|
79
|
+
badExample: `DATA: BEGIN OF blah1,
|
|
80
|
+
test TYPE string,
|
|
81
|
+
test2 TYPE string,
|
|
82
82
|
END OF blah1.`,
|
|
83
|
-
goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
|
|
84
|
-
test TYPE string,
|
|
85
|
-
test2 TYPE string,
|
|
83
|
+
goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
|
|
84
|
+
test TYPE string,
|
|
85
|
+
test2 TYPE string,
|
|
86
86
|
END OF blah2.`,
|
|
87
87
|
};
|
|
88
88
|
}
|
|
@@ -27,15 +27,15 @@ class UseBoolExpression extends _abap_rule_1.ABAPRule {
|
|
|
27
27
|
shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,
|
|
28
28
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
|
|
29
29
|
tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
30
|
-
badExample: `IF line IS INITIAL.
|
|
31
|
-
has_entries = abap_false.
|
|
32
|
-
ELSE.
|
|
33
|
-
has_entries = abap_true.
|
|
34
|
-
ENDIF.
|
|
35
|
-
|
|
30
|
+
badExample: `IF line IS INITIAL.
|
|
31
|
+
has_entries = abap_false.
|
|
32
|
+
ELSE.
|
|
33
|
+
has_entries = abap_true.
|
|
34
|
+
ENDIF.
|
|
35
|
+
|
|
36
36
|
DATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,
|
|
37
|
-
goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
|
|
38
|
-
|
|
37
|
+
goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
|
|
38
|
+
|
|
39
39
|
DATA(fsdf) = xsdbool( foo <> bar ).`,
|
|
40
40
|
};
|
|
41
41
|
}
|
|
@@ -22,15 +22,15 @@ class UseClassBasedExceptions extends _abap_rule_1.ABAPRule {
|
|
|
22
22
|
shortDescription: `Use class based exceptions, checks interface and class definitions`,
|
|
23
23
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-class-based-exceptions`,
|
|
24
24
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
25
|
-
badExample: `INTERFACE lif.
|
|
26
|
-
METHODS load_data
|
|
27
|
-
EXCEPTIONS
|
|
28
|
-
invalid_parameter.
|
|
25
|
+
badExample: `INTERFACE lif.
|
|
26
|
+
METHODS load_data
|
|
27
|
+
EXCEPTIONS
|
|
28
|
+
invalid_parameter.
|
|
29
29
|
ENDINTERFACE.`,
|
|
30
|
-
goodExample: `INTERFACE lif.
|
|
31
|
-
METHODS load_data
|
|
32
|
-
RAISING
|
|
33
|
-
cx_something.
|
|
30
|
+
goodExample: `INTERFACE lif.
|
|
31
|
+
METHODS load_data
|
|
32
|
+
RAISING
|
|
33
|
+
cx_something.
|
|
34
34
|
ENDINTERFACE.`,
|
|
35
35
|
};
|
|
36
36
|
}
|
|
@@ -22,15 +22,15 @@ class UseLineExists extends _abap_rule_1.ABAPRule {
|
|
|
22
22
|
key: "use_line_exists",
|
|
23
23
|
title: "Use line_exists",
|
|
24
24
|
shortDescription: `Use line_exists, from 740sp02 and up`,
|
|
25
|
-
extendedInformation: `
|
|
26
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
|
|
27
|
-
|
|
25
|
+
extendedInformation: `
|
|
26
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
|
|
27
|
+
|
|
28
28
|
Not reported if the READ TABLE statement contains BINARY SEARCH.`,
|
|
29
29
|
tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
30
|
-
badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
|
|
31
|
-
IF sy-subrc = 0.
|
|
30
|
+
badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
|
|
31
|
+
IF sy-subrc = 0.
|
|
32
32
|
ENDIF.`,
|
|
33
|
-
goodExample: `IF line_exists( my_table[ key = 'A' ] ).
|
|
33
|
+
goodExample: `IF line_exists( my_table[ key = 'A' ] ).
|
|
34
34
|
ENDIF.`,
|
|
35
35
|
};
|
|
36
36
|
}
|
|
@@ -23,10 +23,10 @@ class UseNew extends _abap_rule_1.ABAPRule {
|
|
|
23
23
|
key: "use_new",
|
|
24
24
|
title: "Use NEW",
|
|
25
25
|
shortDescription: `Checks for deprecated CREATE OBJECT statements.`,
|
|
26
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
|
|
27
|
-
|
|
28
|
-
If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
|
|
29
|
-
|
|
26
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
|
|
27
|
+
|
|
28
|
+
If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
|
|
29
|
+
|
|
30
30
|
Applicable from v740sp02 and up`,
|
|
31
31
|
badExample: `CREATE OBJECT ref.`,
|
|
32
32
|
goodExample: `ref = NEW #( ).`,
|
|
@@ -21,13 +21,13 @@ class WhenOthersLast extends _abap_rule_1.ABAPRule {
|
|
|
21
21
|
title: "WHEN OTHERS last",
|
|
22
22
|
shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,
|
|
23
23
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
24
|
-
badExample: `CASE bar.
|
|
25
|
-
WHEN OTHERS.
|
|
26
|
-
WHEN 2.
|
|
24
|
+
badExample: `CASE bar.
|
|
25
|
+
WHEN OTHERS.
|
|
26
|
+
WHEN 2.
|
|
27
27
|
ENDCASE.`,
|
|
28
|
-
goodExample: `CASE bar.
|
|
29
|
-
WHEN 2.
|
|
30
|
-
WHEN OTHERS.
|
|
28
|
+
goodExample: `CASE bar.
|
|
29
|
+
WHEN 2.
|
|
30
|
+
WHEN OTHERS.
|
|
31
31
|
ENDCASE.`,
|
|
32
32
|
};
|
|
33
33
|
}
|
package/package.json
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.113.
|
|
4
|
-
"description": "abaplint - Core API",
|
|
5
|
-
"main": "build/src/index.js",
|
|
6
|
-
"typings": "build/abaplint.d.ts",
|
|
7
|
-
"funding": "https://github.com/sponsors/larshp",
|
|
8
|
-
"scripts": {
|
|
9
|
-
"lint": "eslint src/**/*.ts test/**/*.ts",
|
|
10
|
-
"lint:fix": "eslint src/**/*.ts test/**/*.ts --fix",
|
|
11
|
-
"compile": "tsc && sh scripts/version.sh",
|
|
12
|
-
"test": "npm run compile && mocha --timeout 1000 && npm run lint && npm run schema && api-extractor run",
|
|
13
|
-
"test:only": "npm run compile && mocha --timeout 1000000",
|
|
14
|
-
"test:parallel": "npm run compile && mocha --timeout 1000 --parallel --reporter dot",
|
|
15
|
-
"coverage": "npm run compile && c8 mocha && c8 report --reporter=html",
|
|
16
|
-
"lexer_performance": "tsc && curl -o lexer_performance.abap https://raw.githubusercontent.com/abapGit/build/main/zabapgit_standalone.prog.abap && node build/adhoc/lexer_performance.js",
|
|
17
|
-
"parser_performance": "tsc && curl -o lexer_performance.abap https://raw.githubusercontent.com/abapGit/build/main/zabapgit_standalone.prog.abap && node build/adhoc/parser_performance.js",
|
|
18
|
-
"syntax_performance": "tsc && curl -o lexer_performance.abap https://raw.githubusercontent.com/abapGit/build/main/zabapgit_standalone.prog.abap && node build/adhoc/syntax_performance.js",
|
|
19
|
-
"typed_array": "tsc && node build/adhoc/typed_array.js",
|
|
20
|
-
"schema": "node scripts/schema.js > scripts/schema.ts && ts-json-schema-generator --tsconfig tsconfig_schema.json --jsDoc extended --path scripts/schema.ts > scripts/schema.json && node scripts/schema_post.js",
|
|
21
|
-
"publish:minor": "npm --no-git-tag-version version minor && rm -rf build && npm install && npm run test && npm publish --access public",
|
|
22
|
-
"publish:patch": "npm --no-git-tag-version version patch && rm -rf build && npm install && npm run test && npm publish --access public"
|
|
23
|
-
},
|
|
24
|
-
"mocha": {
|
|
25
|
-
"recursive": true,
|
|
26
|
-
"reporter": "progress",
|
|
27
|
-
"spec": "build/test/**/*.js",
|
|
28
|
-
"require": "source-map-support/register"
|
|
29
|
-
},
|
|
30
|
-
"c8": {
|
|
31
|
-
"include": [
|
|
32
|
-
"build/src/**/*.js"
|
|
33
|
-
]
|
|
34
|
-
},
|
|
35
|
-
"repository": {
|
|
36
|
-
"type": "git",
|
|
37
|
-
"url": "git+https://github.com/abaplint/abaplint.git"
|
|
38
|
-
},
|
|
39
|
-
"engines": {
|
|
40
|
-
"node": ">=12.0.0"
|
|
41
|
-
},
|
|
42
|
-
"keywords": [
|
|
43
|
-
"ABAP",
|
|
44
|
-
"lint"
|
|
45
|
-
],
|
|
46
|
-
"author": "Lars Hvam Petersen",
|
|
47
|
-
"license": "MIT",
|
|
48
|
-
"bugs": {
|
|
49
|
-
"url": "https://github.com/abaplint/abaplint/issues"
|
|
50
|
-
},
|
|
51
|
-
"homepage": "https://abaplint.org",
|
|
52
|
-
"devDependencies": {
|
|
53
|
-
"@microsoft/api-extractor": "^7.48.1",
|
|
54
|
-
"@types/chai": "^4.3.20",
|
|
55
|
-
"@types/mocha": "^10.0.10",
|
|
56
|
-
"@types/node": "^22.10.
|
|
57
|
-
"chai": "^4.5.0",
|
|
58
|
-
"eslint": "^9.17.0",
|
|
59
|
-
"mocha": "^11.0.1",
|
|
60
|
-
"c8": "^10.1.3",
|
|
61
|
-
"source-map-support": "^0.5.21",
|
|
62
|
-
"ts-json-schema-generator": "^2.3.0",
|
|
63
|
-
"typescript": "^5.7.2"
|
|
64
|
-
},
|
|
65
|
-
"dependencies": {
|
|
66
|
-
"fast-xml-parser": "^4.5.1",
|
|
67
|
-
"json5": "^2.2.3",
|
|
68
|
-
"vscode-languageserver-types": "^3.17.5"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@abaplint/core",
|
|
3
|
+
"version": "2.113.86",
|
|
4
|
+
"description": "abaplint - Core API",
|
|
5
|
+
"main": "build/src/index.js",
|
|
6
|
+
"typings": "build/abaplint.d.ts",
|
|
7
|
+
"funding": "https://github.com/sponsors/larshp",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"lint": "eslint src/**/*.ts test/**/*.ts",
|
|
10
|
+
"lint:fix": "eslint src/**/*.ts test/**/*.ts --fix",
|
|
11
|
+
"compile": "tsc && sh scripts/version.sh",
|
|
12
|
+
"test": "npm run compile && mocha --timeout 1000 && npm run lint && npm run schema && api-extractor run",
|
|
13
|
+
"test:only": "npm run compile && mocha --timeout 1000000",
|
|
14
|
+
"test:parallel": "npm run compile && mocha --timeout 1000 --parallel --reporter dot",
|
|
15
|
+
"coverage": "npm run compile && c8 mocha && c8 report --reporter=html",
|
|
16
|
+
"lexer_performance": "tsc && curl -o lexer_performance.abap https://raw.githubusercontent.com/abapGit/build/main/zabapgit_standalone.prog.abap && node build/adhoc/lexer_performance.js",
|
|
17
|
+
"parser_performance": "tsc && curl -o lexer_performance.abap https://raw.githubusercontent.com/abapGit/build/main/zabapgit_standalone.prog.abap && node build/adhoc/parser_performance.js",
|
|
18
|
+
"syntax_performance": "tsc && curl -o lexer_performance.abap https://raw.githubusercontent.com/abapGit/build/main/zabapgit_standalone.prog.abap && node build/adhoc/syntax_performance.js",
|
|
19
|
+
"typed_array": "tsc && node build/adhoc/typed_array.js",
|
|
20
|
+
"schema": "node scripts/schema.js > scripts/schema.ts && ts-json-schema-generator --tsconfig tsconfig_schema.json --jsDoc extended --path scripts/schema.ts > scripts/schema.json && node scripts/schema_post.js",
|
|
21
|
+
"publish:minor": "npm --no-git-tag-version version minor && rm -rf build && npm install && npm run test && npm publish --access public",
|
|
22
|
+
"publish:patch": "npm --no-git-tag-version version patch && rm -rf build && npm install && npm run test && npm publish --access public"
|
|
23
|
+
},
|
|
24
|
+
"mocha": {
|
|
25
|
+
"recursive": true,
|
|
26
|
+
"reporter": "progress",
|
|
27
|
+
"spec": "build/test/**/*.js",
|
|
28
|
+
"require": "source-map-support/register"
|
|
29
|
+
},
|
|
30
|
+
"c8": {
|
|
31
|
+
"include": [
|
|
32
|
+
"build/src/**/*.js"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/abaplint/abaplint.git"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=12.0.0"
|
|
41
|
+
},
|
|
42
|
+
"keywords": [
|
|
43
|
+
"ABAP",
|
|
44
|
+
"lint"
|
|
45
|
+
],
|
|
46
|
+
"author": "Lars Hvam Petersen",
|
|
47
|
+
"license": "MIT",
|
|
48
|
+
"bugs": {
|
|
49
|
+
"url": "https://github.com/abaplint/abaplint/issues"
|
|
50
|
+
},
|
|
51
|
+
"homepage": "https://abaplint.org",
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@microsoft/api-extractor": "^7.48.1",
|
|
54
|
+
"@types/chai": "^4.3.20",
|
|
55
|
+
"@types/mocha": "^10.0.10",
|
|
56
|
+
"@types/node": "^22.10.5",
|
|
57
|
+
"chai": "^4.5.0",
|
|
58
|
+
"eslint": "^9.17.0",
|
|
59
|
+
"mocha": "^11.0.1",
|
|
60
|
+
"c8": "^10.1.3",
|
|
61
|
+
"source-map-support": "^0.5.21",
|
|
62
|
+
"ts-json-schema-generator": "^2.3.0",
|
|
63
|
+
"typescript": "^5.7.2"
|
|
64
|
+
},
|
|
65
|
+
"dependencies": {
|
|
66
|
+
"fast-xml-parser": "^4.5.1",
|
|
67
|
+
"json5": "^2.2.3",
|
|
68
|
+
"vscode-languageserver-types": "^3.17.5"
|
|
69
|
+
}
|
|
70
|
+
}
|