Skip to content

Commit a6143cd

Browse files
author
Eugen Günther
authored
Minor bugfix comment usage (#22)
* minor bugfix - comment usage * bugfix - comment usage
1 parent cc11ed4 commit a6143cd

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

clean_code_main/clean_code_checks/y_check_comment_usage.clas.abap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ CLASS Y_CHECK_COMMENT_USAGE IMPLEMENTATION.
141141

142142
IF strlen( <token>-str ) GE 2 AND NOT
143143
( <token>-str+0(2) EQ |*"| OR
144+
<token>-str+0(2) EQ |"!| OR
144145
<token>-str+0(3) EQ |"#E| OR
145146
<token>-str+0(2) EQ |##| OR
146147
<token>-str CP '"' && object_name && '*.' ).

clean_code_main/clean_code_checks/y_check_comment_usage.clas.testclasses.abap

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ CLASS ltd_ref_scan_manager IMPLEMENTATION.
5757
ENDMETHOD.
5858

5959
METHOD set_data_for_ok.
60-
levels = VALUE #( ( depth = 1 level = 0 stmnt = 0 from = 1 to = 14 name = 'ZTEST' type = 'P' ) ).
60+
levels = VALUE #( ( depth = 1 level = 0 stmnt = 0 from = 1 to = 15 name = 'ZTEST' type = 'P' ) ).
6161

62-
structures = VALUE #( ( stmnt_from = 1 stmnt_to = 14 stmnt_type = scan_struc_stmnt_type-function ) ).
62+
structures = VALUE #( ( stmnt_from = 1 stmnt_to = 15 stmnt_type = scan_struc_stmnt_type-function ) ).
6363

6464
statements = VALUE #( ( level = 1 from = '1' to = '1' type = 'P' )
6565
( level = 1 from = '2' to = '2' type = 'K' )
@@ -73,7 +73,8 @@ CLASS ltd_ref_scan_manager IMPLEMENTATION.
7373
( level = 1 from = '11' to = '11' type = 'P' )
7474
( level = 1 from = '12' to = '12' type = 'P' )
7575
( level = 1 from = '13' to = '13' type = 'P' )
76-
( level = 1 from = '14' to = '14' type = 'K' ) ).
76+
( level = 1 from = '14' to = '14' type = 'K' )
77+
( level = 1 from = '15' to = '15' type = 'P' ) ).
7778

7879
tokens = VALUE #( ( str = '"COMMENT' type = 'C' row = 1 )
7980
( str = 'FUNCTION' type = 'I' row = 2 )
@@ -88,8 +89,9 @@ CLASS ltd_ref_scan_manager IMPLEMENTATION.
8889
( str = '"COMMENT' type = 'C' row = 10 )
8990
( str = '*"*COMMENT' type = 'C' row = 11 )
9091
( str = '*"' type = 'C' row = 12 )
91-
( str = 'ENDFUNCTION' type = 'I' row = 13 )
92-
( str = '"COMMENT' type = 'C' row = 14 ) ).
92+
( str = '"! docu' type = 'C' row = 13 )
93+
( str = 'ENDFUNCTION' type = 'I' row = 14 )
94+
( str = '"COMMENT' type = 'C' row = 15 ) ).
9395
ENDMETHOD.
9496

9597
METHOD set_data_for_error.

0 commit comments

Comments
 (0)