Skip to content

Commit 7923f08

Browse files
bjoern-jueliger-sapgardian12
authored andcommitted
Add pseudo comment
The CodePal always looks for the pseudo comment at the position of the finding. Since we position the finding on the first line of the method implementation, the unit test also needs to position it at the first line, then it works.
1 parent caad707 commit 7923f08

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/checks/y_check_missing_ut_assert.clas.abap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ CLASS y_check_missing_ut_assert IMPLEMENTATION.
3131
settings-threshold = 0.
3232
settings-prio = c_warning.
3333
settings-documentation = |{ c_docs_path-checks }unit_test_missing_assert.md|.
34+
settings-pseudo_comment = '"#EC CI_MISS_ASSERT'.
3435

3536
relevant_statement_types = VALUE #( ( scan_struc_stmnt_type-class_definition )
3637
( scan_struc_stmnt_type-method ) ).

src/checks/y_check_missing_ut_assert.clas.testclasses.abap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ CLASS local_test_class IMPLEMENTATION.
5151
( ' CLASS y_example_class DEFINITION FOR TESTING. ' )
5252
( ' PUBLIC SECTION. ' )
5353
( ' PROTECTED SECTION. ' )
54-
( ' METHODS test FOR TESTING. "#EC MISS_UT_ASSERT ' )
54+
( ' METHODS test FOR TESTING.' )
5555
( ' ENDCLASS. ' )
5656

5757
( ' CLASS y_example_class IMPLEMENTATION. ' )
58-
( ' METHOD test. ' )
58+
( ' METHOD test. "#EC CI_MISS_ASSERT ' )
5959
( ' RETURN. ' )
6060
( ' ENDMETHOD. ' )
6161
( ' ENDCLASS. ' ) ).

0 commit comments

Comments
 (0)