Skip to content

Commit c1ebf74

Browse files
committed
fixes
1 parent 4da55f0 commit c1ebf74

File tree

5 files changed

+29
-19
lines changed

5 files changed

+29
-19
lines changed

src/checks/y_check_comment_usage.clas.abap

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ CLASS y_check_comment_usage IMPLEMENTATION.
3333
settings-threshold = 10.
3434
settings-documentation = |{ c_docs_path-checks }comment-usage.md|.
3535

36-
relevant_statement_types = VALUE #( BASE relevant_statement_types
37-
( scan_struc_stmnt_type-class_definition )
38-
( scan_struc_stmnt_type-interface ) ).
36+
relevant_statement_types = VALUE #( ( scan_struc_stmnt_type-class_pool )
37+
( scan_struc_stmnt_type-report )
38+
( scan_struc_stmnt_type-program )
39+
( scan_struc_stmnt_type-function_pool )
40+
( scan_struc_stmnt_type-interface_pool ) ).
3941

4042
set_check_message( 'Percentage of comments must be lower than &3% of the productive code! (&2%>=&3%) (&1 lines found)' ).
4143
ENDMETHOD.

src/checks/y_check_pseudo_comment_usage.clas.abap

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ CLASS y_check_pseudo_comment_usage IMPLEMENTATION.
5454
settings-apply_on_productive_code = abap_true.
5555
settings-prio = c_note.
5656

57-
relevant_statement_types = VALUE #( ).
58-
relevant_structure_types = VALUE #( ).
57+
relevant_statement_types = VALUE #( BASE relevant_statement_types
58+
( scan_struc_stmnt_type-class_definition )
59+
( scan_struc_stmnt_type-interface ) ).
5960

6061
set_check_message( '&1 pseudo comments!' ).
6162

src/foundation/y_check_base.clas.abap

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@ CLASS y_check_base DEFINITION PUBLIC ABSTRACT
5454
DATA use_default_attributes TYPE abap_bool VALUE abap_true ##NO_TEXT.
5555
DATA attributes_maintained TYPE abap_bool.
5656

57+
"! <p class="shorttext synchronized" lang="en">Relevant Statement Types for Inspection</p>
58+
"! There are default values set in the Y_CHECK_BASE, and you can reuse the constants available in the 'scan_struc_stmnt_type' structure to enhance or change it.
5759
DATA relevant_statement_types TYPE TABLE OF sstruc-stmnt_type.
60+
61+
"! <p class="shorttext synchronized" lang="en">Relevant Structure Types for Inspection</p>
62+
"! There are default values set in the Y_CHECK_BASE, and you can reuse the constants available in the 'scan_struc_type' structure to enhance or change it.
5863
DATA relevant_structure_types TYPE TABLE OF sstruc-type.
5964

6065
METHODS execute_check.
@@ -73,7 +78,7 @@ CLASS y_check_base DEFINITION PUBLIC ABSTRACT
7378
METHODS get_code IMPORTING message_prio TYPE sychar01
7479
RETURNING VALUE(result) TYPE sci_errc.
7580

76-
"! <p class="shorttext synchronized" lang="en">Inspect All Structures</p>
81+
"! <p class="shorttext synchronized" lang="en">Inspect Structures</p>
7782
METHODS inspect_structures.
7883

7984
"! <p class="shorttext synchronized" lang="en">Inspect Statements of a Structure</p>
@@ -152,8 +157,6 @@ CLASS y_check_base DEFINITION PUBLIC ABSTRACT
152157
METHODS get_application_component IMPORTING level TYPE slevel
153158
RETURNING VALUE(result) TYPE df14l-ps_posid.
154159

155-
METHODS are_relevant_types_set RETURNING VALUE(result) TYPE abap_bool.
156-
157160
ENDCLASS.
158161

159162

@@ -771,8 +774,6 @@ CLASS y_check_base IMPLEMENTATION.
771774

772775

773776
METHOD should_skip_type.
774-
CHECK are_relevant_types_set( ) = abap_true.
775-
776777
result = xsdbool( is_statement_type_relevant( structure ) = abap_false
777778
AND is_structure_type_relevant( structure ) = abap_false ).
778779
ENDMETHOD.
@@ -816,10 +817,4 @@ CLASS y_check_base IMPLEMENTATION.
816817
ENDMETHOD.
817818

818819

819-
METHOD are_relevant_types_set.
820-
result = xsdbool( relevant_statement_types IS NOT INITIAL
821-
OR relevant_structure_types IS NOT INITIAL ).
822-
ENDMETHOD.
823-
824-
825820
ENDCLASS.

src/foundation/y_check_base.clas.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,26 @@
7979
<CLSNAME>Y_CHECK_BASE</CLSNAME>
8080
<CMPNAME>INSPECT_STRUCTURES</CMPNAME>
8181
<LANGU>E</LANGU>
82-
<DESCRIPT>Inspect All Structures</DESCRIPT>
82+
<DESCRIPT>Inspect Structures</DESCRIPT>
8383
</SEOCOMPOTX>
8484
<SEOCOMPOTX>
8585
<CLSNAME>Y_CHECK_BASE</CLSNAME>
8686
<CMPNAME>INSPECT_TOKENS</CMPNAME>
8787
<LANGU>E</LANGU>
8888
<DESCRIPT>Inspect Tokens of a Statement</DESCRIPT>
8989
</SEOCOMPOTX>
90+
<SEOCOMPOTX>
91+
<CLSNAME>Y_CHECK_BASE</CLSNAME>
92+
<CMPNAME>RELEVANT_STATEMENT_TYPES</CMPNAME>
93+
<LANGU>E</LANGU>
94+
<DESCRIPT>Relevant Statement Types for Inspection</DESCRIPT>
95+
</SEOCOMPOTX>
96+
<SEOCOMPOTX>
97+
<CLSNAME>Y_CHECK_BASE</CLSNAME>
98+
<CMPNAME>RELEVANT_STRUCTURE_TYPES</CMPNAME>
99+
<LANGU>E</LANGU>
100+
<DESCRIPT>Relevant Structure Types for Inspection</DESCRIPT>
101+
</SEOCOMPOTX>
90102
<SEOCOMPOTX>
91103
<CLSNAME>Y_CHECK_BASE</CLSNAME>
92104
<CMPNAME>SETTINGS</CMPNAME>

src/foundation/y_ci_check_registration.prog.abap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ CONSTANTS: BEGIN OF reference,
2424
error TYPE c LENGTH 1 VALUE 'E',
2525
END OF reference.
2626

27-
CLASS lcl_check_registration DEFINITION. "#EC NUM_PUBLIC_ATTR
27+
CLASS lcl_check_registration DEFINITION.
2828
PUBLIC SECTION.
29-
CLASS-DATA name_tab TYPE STANDARD TABLE OF scitests-name.
29+
CLASS-DATA name_tab TYPE STANDARD TABLE OF scitests-name READ-ONLY.
3030

3131
CLASS-METHODS select_object_list
3232
RETURNING VALUE(result) LIKE name_tab

0 commit comments

Comments
 (0)