@@ -30,7 +30,6 @@ CLASS y_check_base DEFINITION PUBLIC ABSTRACT
3030 apply_on_test_code TYPE ycicc_testcode,
3131 documentation TYPE c LENGTH 1000 ,
3232 is_threshold_reversed TYPE abap_bool ,
33- allow_pseudo_comments TYPE abap_bool ,
3433 END OF settings.
3534
3635 METHODS constructor.
@@ -105,7 +104,8 @@ CLASS y_check_base DEFINITION PUBLIC ABSTRACT
105104 parameter_04 TYPE csequence OPTIONAL
106105 is_include_specific TYPE sci_inclspec DEFAULT ' '
107106 additional_information TYPE xstring OPTIONAL
108- checksum TYPE int4 OPTIONAL . "#EC OPTL_PARAM
107+ checksum TYPE int4 OPTIONAL
108+ pseudo_comments TYPE t_comments OPTIONAL . "#EC OPTL_PARAM
109109
110110 METHODS get_column_abs REDEFINITION .
111111 METHODS get_column_rel REDEFINITION .
@@ -149,14 +149,14 @@ CLASS y_check_base DEFINITION PUBLIC ABSTRACT
149149 METHODS is_structure_type_relevant IMPORTING structure TYPE sstruc
150150 RETURNING VALUE (result ) TYPE abap_bool .
151151
152- METHODS is_app_comp_in_scope IMPORTING level TYPE stmnt_levl
153- RETURNING VALUE (result ) TYPE abap_bool .
152+ METHODS is_app_comp_in_scope IMPORTING level TYPE stmnt_levl
153+ RETURNING value (result ) TYPE abap_bool .
154154
155155ENDCLASS .
156156
157157
158158
159- CLASS Y_CHECK_BASE IMPLEMENTATION .
159+ CLASS y_check_base IMPLEMENTATION .
160160
161161
162162 METHOD check_start_conditions .
@@ -181,7 +181,6 @@ CLASS Y_CHECK_BASE IMPLEMENTATION.
181181 settings-apply_on_productive_code = abap_true .
182182 settings-apply_on_test_code = abap_true .
183183 settings-documentation = | { c_docs_path-main } check_documentation.md| .
184- settings-allow_pseudo_comments = abap_true .
185184
186185 has_attributes = do_attributes_exist( ).
187186
@@ -299,7 +298,7 @@ CLASS Y_CHECK_BASE IMPLEMENTATION.
299298 check_configuration-object_creation_date = settings-object_created_on.
300299 check_configuration-prio = settings-prio.
301300 check_configuration-threshold = settings-threshold.
302- check_configuration-allow_pseudo_comments = settings-allow_pseudo_comments.
301+
303302 APPEND check_configuration TO check_configurations.
304303 ENDIF .
305304 EXPORT
@@ -308,7 +307,6 @@ CLASS Y_CHECK_BASE IMPLEMENTATION.
308307 threshold = check_configuration-threshold
309308 apply_on_productive_code = check_configuration-apply_on_productive_code
310309 apply_on_testcode = check_configuration-apply_on_testcode
311- allow_pseudo_comments = check_configuration-allow_pseudo_comments
312310 TO DATA BUFFER p_attributes.
313311 ENDMETHOD .
314312
@@ -514,7 +512,6 @@ CLASS Y_CHECK_BASE IMPLEMENTATION.
514512 check_configuration-apply_on_productive_code = settings-apply_on_productive_code.
515513 check_configuration-apply_on_testcode = settings-apply_on_test_code.
516514 check_configuration-threshold = settings-threshold.
517- check_configuration-allow_pseudo_comments = settings-allow_pseudo_comments.
518515 ENDIF .
519516
520517 INSERT VALUE #(
@@ -553,14 +550,6 @@ CLASS Y_CHECK_BASE IMPLEMENTATION.
553550 ) INTO TABLE sci_attributes.
554551 ENDIF .
555552
556- IF settings-pseudo_comment IS NOT INITIAL .
557- INSERT VALUE #(
558- kind = ''
559- ref = REF #( check_configuration-allow_pseudo_comments )
560- text = | Allow { settings-pseudo_comment } |
561- ) INTO TABLE sci_attributes.
562- ENDIF .
563-
564553 title = description.
565554
566555 attributes_ok = abap_false .
@@ -608,7 +597,7 @@ CLASS Y_CHECK_BASE IMPLEMENTATION.
608597 ENDIF .
609598
610599 IF clean_code_exemption_handler IS NOT BOUND .
611- clean_code_exemption_handler = NEW y_exemption_handler( ).
600+ clean_code_exemption_handler = new y_exemption_handler( ).
612601 ENDIF .
613602
614603 IF test_code_detector IS NOT BOUND .
@@ -649,7 +638,6 @@ CLASS Y_CHECK_BASE IMPLEMENTATION.
649638 threshold = check_configuration-threshold
650639 apply_on_productive_code = check_configuration-apply_on_productive_code
651640 apply_on_testcode = check_configuration-apply_on_testcode
652- allow_pseudo_comments = check_configuration-allow_pseudo_comments
653641 FROM DATA BUFFER p_attributes.
654642 APPEND check_configuration TO check_configurations.
655643 CATCH cx_root. "#EC NEED_CX_ROOT
@@ -659,15 +647,12 @@ CLASS Y_CHECK_BASE IMPLEMENTATION.
659647
660648
661649 METHOD raise_error .
662- DATA (pseudo_comment ) = COND sci_pcom( WHEN settings-allow_pseudo_comments = abap_false THEN settings-pseudo_comment
663- ELSE space ).
664-
665650 statistics->collect( kind = error_priority
666651 pc = NEW y_pseudo_comment_detector( )->is_pseudo_comment( ref_scan_manager = ref_scan_manager
667652 scimessages = scimessages
668653 test = myname
669654 code = get_code( error_priority )
670- suppress = pseudo_comment
655+ suppress = settings- pseudo_comment
671656 position = statement_index ) ).
672657
673658 IF cl_abap_typedescr=>describe_by_object_ref( ref_scan_manager )->get_relative_name( ) EQ 'Y_REF_SCAN_MANAGER' .
@@ -680,15 +665,17 @@ CLASS Y_CHECK_BASE IMPLEMENTATION.
680665 p_kind = error_priority
681666 p_test = myname
682667 p_code = get_code( error_priority )
683- p_suppress = pseudo_comment
668+ p_suppress = settings- pseudo_comment
684669 p_param_1 = parameter_01
685670 p_param_2 = parameter_02
686671 p_param_3 = parameter_03
687672 p_param_4 = parameter_04
688673 p_inclspec = is_include_specific
689674 p_detail = additional_information
690- p_checksum_1 = checksum ).
675+ p_checksum_1 = checksum
676+ p_comments = pseudo_comments ).
691677 ENDIF .
678+
692679 ENDMETHOD .
693680
694681
@@ -810,4 +797,6 @@ CLASS Y_CHECK_BASE IMPLEMENTATION.
810797 result = abap_true .
811798 ENDTRY .
812799 ENDMETHOD .
800+
801+
813802ENDCLASS .
0 commit comments