@abaplint/core 2.94.9 → 2.94.11
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/adhoc/lexer_performance.ts +15 -15
- package/adhoc/parser_performance.ts +18 -18
- package/build/src/abap/2_statements/combi.js +9 -5
- package/build/src/abap/2_statements/statement_parser.js +31 -24
- 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 +2 -2
- package/build/src/rules/abapdoc.js +3 -3
- package/build/src/rules/align_parameters.js +39 -39
- package/build/src/rules/ambiguous_statement.js +5 -5
- package/build/src/rules/avoid_use.js +8 -8
- package/build/src/rules/begin_end_names.js +4 -4
- package/build/src/rules/begin_single_include.js +12 -12
- 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 +8 -8
- 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 +6 -2
- package/build/src/rules/dangerous_statement.js +1 -1
- package/build/src/rules/definitions_top.js +2 -2
- package/build/src/rules/downport.js +83 -83
- package/build/src/rules/exit_or_check.js +3 -3
- 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/functional_writing.js +17 -17
- package/build/src/rules/global_class.js +8 -8
- package/build/src/rules/identical_conditions.js +2 -2
- 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 +26 -26
- package/build/src/rules/implement_methods.js +3 -3
- package/build/src/rules/in_statement_indentation.js +11 -11
- package/build/src/rules/intf_referencing_clas.js +3 -3
- 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 +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_overwrites_builtin.js +2 -2
- 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_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 +42 -42
- 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 +7 -7
- package/build/src/rules/prefer_raise_exception_new.js +3 -3
- package/build/src/rules/prefer_returning_to_exporting.js +1 -1
- package/build/src/rules/prefer_xsdbool.js +2 -2
- package/build/src/rules/remove_descriptions.js +4 -4
- package/build/src/rules/rfc_error_handling.js +9 -9
- package/build/src/rules/select_add_order_by.js +5 -5
- package/build/src/rules/select_performance.js +5 -5
- package/build/src/rules/sicf_consistency.js +2 -2
- package/build/src/rules/space_before_dot.js +2 -2
- package/build/src/rules/start_at_tab.js +1 -1
- package/build/src/rules/sy_modification.js +4 -4
- package/build/src/rules/tabl_enhancement_category.js +2 -2
- package/build/src/rules/unnecessary_pragma.js +22 -22
- package/build/src/rules/unnecessary_return.js +5 -5
- package/build/src/rules/unused_methods.js +9 -9
- package/build/src/rules/unused_variables.js +4 -4
- package/build/src/rules/use_bool_expression.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 +67 -67
|
@@ -22,16 +22,16 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
|
|
|
22
22
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
23
23
|
shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
|
|
24
24
|
extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
|
|
25
|
-
badExample: `
|
|
26
|
-
CALL FUNCTION 'ZRFC'
|
|
25
|
+
badExample: `
|
|
26
|
+
CALL FUNCTION 'ZRFC'
|
|
27
27
|
DESTINATION lv_rfc.`,
|
|
28
|
-
goodExample: `
|
|
29
|
-
CALL FUNCTION 'ZRFC'
|
|
30
|
-
DESTINATION lv_rfc
|
|
31
|
-
EXCEPTIONS
|
|
32
|
-
system_failure = 1 MESSAGE msg
|
|
33
|
-
communication_failure = 2 MESSAGE msg
|
|
34
|
-
resource_failure = 3
|
|
28
|
+
goodExample: `
|
|
29
|
+
CALL FUNCTION 'ZRFC'
|
|
30
|
+
DESTINATION lv_rfc
|
|
31
|
+
EXCEPTIONS
|
|
32
|
+
system_failure = 1 MESSAGE msg
|
|
33
|
+
communication_failure = 2 MESSAGE msg
|
|
34
|
+
resource_failure = 3
|
|
35
35
|
OTHERS = 4.`,
|
|
36
36
|
};
|
|
37
37
|
}
|
|
@@ -21,11 +21,11 @@ class SelectAddOrderBy {
|
|
|
21
21
|
key: "select_add_order_by",
|
|
22
22
|
title: "SELECT add ORDER BY",
|
|
23
23
|
shortDescription: `SELECTs add ORDER BY clause`,
|
|
24
|
-
extendedInformation: `
|
|
25
|
-
This will make sure that the SELECT statement returns results in the same sequence on different databases
|
|
26
|
-
|
|
27
|
-
add ORDER BY PRIMARY KEY if in doubt
|
|
28
|
-
|
|
24
|
+
extendedInformation: `
|
|
25
|
+
This will make sure that the SELECT statement returns results in the same sequence on different databases
|
|
26
|
+
|
|
27
|
+
add ORDER BY PRIMARY KEY if in doubt
|
|
28
|
+
|
|
29
29
|
If the target is a sorted/hashed table, no issue is reported`,
|
|
30
30
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
31
31
|
};
|
|
@@ -32,14 +32,14 @@ class SelectPerformance {
|
|
|
32
32
|
key: "select_performance",
|
|
33
33
|
title: "SELECT performance",
|
|
34
34
|
shortDescription: `Various checks regarding SELECT performance.`,
|
|
35
|
-
extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
|
|
36
|
-
|
|
35
|
+
extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
|
|
36
|
+
|
|
37
37
|
SELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,
|
|
38
38
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
|
|
39
|
-
badExample: `SELECT field1, field2 FROM table
|
|
40
|
-
INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
|
|
39
|
+
badExample: `SELECT field1, field2 FROM table
|
|
40
|
+
INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
|
|
41
41
|
ENDSELECT.`,
|
|
42
|
-
goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
|
|
42
|
+
goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
|
|
43
43
|
INTO TABLE @DATA(table) ORDER BY field3 DESCENDING`,
|
|
44
44
|
};
|
|
45
45
|
}
|
|
@@ -24,8 +24,8 @@ class SICFConsistency {
|
|
|
24
24
|
key: "sicf_consistency",
|
|
25
25
|
title: "SICF consistency",
|
|
26
26
|
shortDescription: `Checks the validity of ICF services`,
|
|
27
|
-
extendedInformation: `* Class defined in handler must exist
|
|
28
|
-
* Class must not have any syntax errors
|
|
27
|
+
extendedInformation: `* Class defined in handler must exist
|
|
28
|
+
* Class must not have any syntax errors
|
|
29
29
|
* Class must implement interface IF_HTTP_EXTENSION`,
|
|
30
30
|
};
|
|
31
31
|
}
|
|
@@ -29,8 +29,8 @@ class SpaceBeforeDot extends _abap_rule_1.ABAPRule {
|
|
|
29
29
|
key: "space_before_dot",
|
|
30
30
|
title: "Space before dot",
|
|
31
31
|
shortDescription: `Checks for extra spaces before dots at the ends of statements`,
|
|
32
|
-
extendedInformation: `
|
|
33
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
|
|
32
|
+
extendedInformation: `
|
|
33
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
|
|
34
34
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,
|
|
35
35
|
tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
36
36
|
badExample: `WRITE bar .`,
|
|
@@ -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.`,
|
|
@@ -19,12 +19,12 @@ 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: `
|
|
27
|
-
sy-uname = 2.
|
|
26
|
+
badExample: `
|
|
27
|
+
sy-uname = 2.
|
|
28
28
|
sy = sy.`,
|
|
29
29
|
};
|
|
30
30
|
}
|
|
@@ -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
|
};
|
|
@@ -21,31 +21,31 @@ class UnnecessaryPragma extends _abap_rule_1.ABAPRule {
|
|
|
21
21
|
key: "unnecessary_pragma",
|
|
22
22
|
title: "Unnecessary Pragma",
|
|
23
23
|
shortDescription: `Finds pragmas which can be removed`,
|
|
24
|
-
extendedInformation: `* NO_HANDLER with handler
|
|
25
|
-
|
|
26
|
-
* NEEDED without definition
|
|
27
|
-
|
|
28
|
-
* NO_TEXT without texts
|
|
29
|
-
|
|
24
|
+
extendedInformation: `* NO_HANDLER with handler
|
|
25
|
+
|
|
26
|
+
* NEEDED without definition
|
|
27
|
+
|
|
28
|
+
* NO_TEXT without texts
|
|
29
|
+
|
|
30
30
|
* SUBRC_OK where sy-subrc is checked`,
|
|
31
31
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
32
|
-
badExample: `TRY.
|
|
33
|
-
...
|
|
34
|
-
CATCH zcx_abapgit_exception ##NO_HANDLER.
|
|
35
|
-
RETURN. " it has a handler
|
|
36
|
-
ENDTRY.
|
|
37
|
-
MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
|
|
38
|
-
SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
|
|
39
|
-
IF sy-subrc <> 0.
|
|
32
|
+
badExample: `TRY.
|
|
33
|
+
...
|
|
34
|
+
CATCH zcx_abapgit_exception ##NO_HANDLER.
|
|
35
|
+
RETURN. " it has a handler
|
|
36
|
+
ENDTRY.
|
|
37
|
+
MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
|
|
38
|
+
SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
|
|
39
|
+
IF sy-subrc <> 0.
|
|
40
40
|
ENDIF.`,
|
|
41
|
-
goodExample: `TRY.
|
|
42
|
-
...
|
|
43
|
-
CATCH zcx_abapgit_exception.
|
|
44
|
-
RETURN.
|
|
45
|
-
ENDTRY.
|
|
46
|
-
MESSAGE w125(zbar) WITH c_foo INTO message.
|
|
47
|
-
SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
|
|
48
|
-
IF sy-subrc <> 0.
|
|
41
|
+
goodExample: `TRY.
|
|
42
|
+
...
|
|
43
|
+
CATCH zcx_abapgit_exception.
|
|
44
|
+
RETURN.
|
|
45
|
+
ENDTRY.
|
|
46
|
+
MESSAGE w125(zbar) WITH c_foo INTO message.
|
|
47
|
+
SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
|
|
48
|
+
IF sy-subrc <> 0.
|
|
49
49
|
ENDIF.`,
|
|
50
50
|
};
|
|
51
51
|
}
|
|
@@ -22,12 +22,12 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
|
|
|
22
22
|
shortDescription: `Finds unnecessary RETURN statements`,
|
|
23
23
|
extendedInformation: `Finds unnecessary RETURN statements`,
|
|
24
24
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
25
|
-
badExample: `METHOD hello.
|
|
26
|
-
...
|
|
27
|
-
RETURN.
|
|
25
|
+
badExample: `METHOD hello.
|
|
26
|
+
...
|
|
27
|
+
RETURN.
|
|
28
28
|
ENDMETHOD.`,
|
|
29
|
-
goodExample: `METHOD hello.
|
|
30
|
-
...
|
|
29
|
+
goodExample: `METHOD hello.
|
|
30
|
+
...
|
|
31
31
|
ENDMETHOD.`,
|
|
32
32
|
};
|
|
33
33
|
}
|
|
@@ -55,15 +55,15 @@ class UnusedMethods {
|
|
|
55
55
|
key: "unused_methods",
|
|
56
56
|
title: "Unused methods",
|
|
57
57
|
shortDescription: `Checks for unused methods`,
|
|
58
|
-
extendedInformation: `Checks private and protected methods.
|
|
59
|
-
|
|
60
|
-
Skips:
|
|
61
|
-
* methods FOR TESTING
|
|
62
|
-
* methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
|
|
63
|
-
* class_constructor + constructor methods
|
|
64
|
-
* event handlers
|
|
65
|
-
* methods that are redefined
|
|
66
|
-
* INCLUDEs
|
|
58
|
+
extendedInformation: `Checks private and protected methods.
|
|
59
|
+
|
|
60
|
+
Skips:
|
|
61
|
+
* methods FOR TESTING
|
|
62
|
+
* methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
|
|
63
|
+
* class_constructor + constructor methods
|
|
64
|
+
* event handlers
|
|
65
|
+
* methods that are redefined
|
|
66
|
+
* INCLUDEs
|
|
67
67
|
`,
|
|
68
68
|
tags: [],
|
|
69
69
|
pragma: "##CALLED",
|
|
@@ -64,10 +64,10 @@ class UnusedVariables {
|
|
|
64
64
|
key: "unused_variables",
|
|
65
65
|
title: "Unused variables",
|
|
66
66
|
shortDescription: `Checks for unused variables and constants`,
|
|
67
|
-
extendedInformation: `Skips event parameters.
|
|
68
|
-
|
|
69
|
-
Note that this currently does not work if the source code uses macros.
|
|
70
|
-
|
|
67
|
+
extendedInformation: `Skips event parameters.
|
|
68
|
+
|
|
69
|
+
Note that this currently does not work if the source code uses macros.
|
|
70
|
+
|
|
71
71
|
Unused variables are not reported if the object contains syntax errors. Errors found in INCLUDES are reported for the main program.`,
|
|
72
72
|
tags: [_irule_1.RuleTag.Quickfix],
|
|
73
73
|
pragma: "##NEEDED",
|
|
@@ -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 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,67 +1,67 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.94.
|
|
4
|
-
"description": "abaplint - Core API",
|
|
5
|
-
"main": "build/src/index.js",
|
|
6
|
-
"typings": "build/abaplint.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"lint": "eslint src/**/*.ts test/**/*.ts --format unix",
|
|
9
|
-
"lint:fix": "eslint src/**/*.ts test/**/*.ts --format unix --fix",
|
|
10
|
-
"compile": "tsc && sh scripts/version.sh",
|
|
11
|
-
"test": "npm run compile && mocha --timeout 1000 && npm run lint && npm run schema && api-extractor run",
|
|
12
|
-
"test:only": "npm run compile && mocha",
|
|
13
|
-
"test:parallel": "npm run compile && mocha --timeout 1000 --parallel --reporter dot",
|
|
14
|
-
"coverage": "npm run compile && c8 mocha && c8 report --reporter=html",
|
|
15
|
-
"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",
|
|
16
|
-
"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",
|
|
17
|
-
"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",
|
|
18
|
-
"publish:minor": "npm --no-git-tag-version version minor && rm -rf build && npm install && npm run test && npm publish --access public",
|
|
19
|
-
"publish:patch": "npm --no-git-tag-version version patch && rm -rf build && npm install && npm run test && npm publish --access public"
|
|
20
|
-
},
|
|
21
|
-
"mocha": {
|
|
22
|
-
"recursive": true,
|
|
23
|
-
"reporter": "progress",
|
|
24
|
-
"spec": "build/test/**/*.js",
|
|
25
|
-
"require": "source-map-support/register"
|
|
26
|
-
},
|
|
27
|
-
"c8": {
|
|
28
|
-
"include": [
|
|
29
|
-
"build/src/**/*.js"
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
|
-
"repository": {
|
|
33
|
-
"type": "git",
|
|
34
|
-
"url": "git+https://github.com/abaplint/abaplint.git"
|
|
35
|
-
},
|
|
36
|
-
"engines": {
|
|
37
|
-
"node": ">=12.0.0"
|
|
38
|
-
},
|
|
39
|
-
"keywords": [
|
|
40
|
-
"ABAP",
|
|
41
|
-
"lint"
|
|
42
|
-
],
|
|
43
|
-
"author": "Lars Hvam Petersen",
|
|
44
|
-
"license": "MIT",
|
|
45
|
-
"bugs": {
|
|
46
|
-
"url": "https://github.com/abaplint/abaplint/issues"
|
|
47
|
-
},
|
|
48
|
-
"homepage": "https://abaplint.org",
|
|
49
|
-
"devDependencies": {
|
|
50
|
-
"@microsoft/api-extractor": "^7.33.7",
|
|
51
|
-
"@types/chai": "^4.3.4",
|
|
52
|
-
"@types/mocha": "^10.0.1",
|
|
53
|
-
"@types/node": "^18.11.
|
|
54
|
-
"chai": "^4.3.7",
|
|
55
|
-
"eslint": "^8.30.0",
|
|
56
|
-
"mocha": "^10.2.0",
|
|
57
|
-
"c8": "^7.12.0",
|
|
58
|
-
"source-map-support": "^0.5.21",
|
|
59
|
-
"ts-json-schema-generator": "^1.2.0",
|
|
60
|
-
"typescript": "^4.9.4"
|
|
61
|
-
},
|
|
62
|
-
"dependencies": {
|
|
63
|
-
"fast-xml-parser": "^4.0.12",
|
|
64
|
-
"json5": "^2.2.2",
|
|
65
|
-
"vscode-languageserver-types": "^3.17.2"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@abaplint/core",
|
|
3
|
+
"version": "2.94.11",
|
|
4
|
+
"description": "abaplint - Core API",
|
|
5
|
+
"main": "build/src/index.js",
|
|
6
|
+
"typings": "build/abaplint.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"lint": "eslint src/**/*.ts test/**/*.ts --format unix",
|
|
9
|
+
"lint:fix": "eslint src/**/*.ts test/**/*.ts --format unix --fix",
|
|
10
|
+
"compile": "tsc && sh scripts/version.sh",
|
|
11
|
+
"test": "npm run compile && mocha --timeout 1000 && npm run lint && npm run schema && api-extractor run",
|
|
12
|
+
"test:only": "npm run compile && mocha",
|
|
13
|
+
"test:parallel": "npm run compile && mocha --timeout 1000 --parallel --reporter dot",
|
|
14
|
+
"coverage": "npm run compile && c8 mocha && c8 report --reporter=html",
|
|
15
|
+
"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",
|
|
16
|
+
"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",
|
|
17
|
+
"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",
|
|
18
|
+
"publish:minor": "npm --no-git-tag-version version minor && rm -rf build && npm install && npm run test && npm publish --access public",
|
|
19
|
+
"publish:patch": "npm --no-git-tag-version version patch && rm -rf build && npm install && npm run test && npm publish --access public"
|
|
20
|
+
},
|
|
21
|
+
"mocha": {
|
|
22
|
+
"recursive": true,
|
|
23
|
+
"reporter": "progress",
|
|
24
|
+
"spec": "build/test/**/*.js",
|
|
25
|
+
"require": "source-map-support/register"
|
|
26
|
+
},
|
|
27
|
+
"c8": {
|
|
28
|
+
"include": [
|
|
29
|
+
"build/src/**/*.js"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/abaplint/abaplint.git"
|
|
35
|
+
},
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=12.0.0"
|
|
38
|
+
},
|
|
39
|
+
"keywords": [
|
|
40
|
+
"ABAP",
|
|
41
|
+
"lint"
|
|
42
|
+
],
|
|
43
|
+
"author": "Lars Hvam Petersen",
|
|
44
|
+
"license": "MIT",
|
|
45
|
+
"bugs": {
|
|
46
|
+
"url": "https://github.com/abaplint/abaplint/issues"
|
|
47
|
+
},
|
|
48
|
+
"homepage": "https://abaplint.org",
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@microsoft/api-extractor": "^7.33.7",
|
|
51
|
+
"@types/chai": "^4.3.4",
|
|
52
|
+
"@types/mocha": "^10.0.1",
|
|
53
|
+
"@types/node": "^18.11.18",
|
|
54
|
+
"chai": "^4.3.7",
|
|
55
|
+
"eslint": "^8.30.0",
|
|
56
|
+
"mocha": "^10.2.0",
|
|
57
|
+
"c8": "^7.12.0",
|
|
58
|
+
"source-map-support": "^0.5.21",
|
|
59
|
+
"ts-json-schema-generator": "^1.2.0",
|
|
60
|
+
"typescript": "^4.9.4"
|
|
61
|
+
},
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"fast-xml-parser": "^4.0.12",
|
|
64
|
+
"json5": "^2.2.2",
|
|
65
|
+
"vscode-languageserver-types": "^3.17.2"
|
|
66
|
+
}
|
|
67
|
+
}
|