@@ -30,7 +30,6 @@ CLASS y_check_base DEFINITION PUBLIC ABSTRACT
30
30
apply_on_test_code TYPE ycicc_testcode,
31
31
documentation TYPE c LENGTH 1000 ,
32
32
is_threshold_reversed TYPE abap_bool ,
33
- allow_pseudo_comments TYPE abap_bool ,
34
33
END OF settings.
35
34
36
35
METHODS constructor.
@@ -105,7 +104,8 @@ CLASS y_check_base DEFINITION PUBLIC ABSTRACT
105
104
parameter_04 TYPE csequence OPTIONAL
106
105
is_include_specific TYPE sci_inclspec DEFAULT ' '
107
106
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
109
109
110
110
METHODS get_column_abs REDEFINITION .
111
111
METHODS get_column_rel REDEFINITION .
@@ -149,14 +149,14 @@ CLASS y_check_base DEFINITION PUBLIC ABSTRACT
149
149
METHODS is_structure_type_relevant IMPORTING structure TYPE sstruc
150
150
RETURNING VALUE (result ) TYPE abap_bool .
151
151
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 .
154
154
155
155
ENDCLASS .
156
156
157
157
158
158
159
- CLASS Y_CHECK_BASE IMPLEMENTATION .
159
+ CLASS y_check_base IMPLEMENTATION .
160
160
161
161
162
162
METHOD check_start_conditions .
@@ -181,7 +181,6 @@ CLASS Y_CHECK_BASE IMPLEMENTATION.
181
181
settings-apply_on_productive_code = abap_true .
182
182
settings-apply_on_test_code = abap_true .
183
183
settings-documentation = | { c_docs_path-main } check_documentation.md| .
184
- settings-allow_pseudo_comments = abap_true .
185
184
186
185
has_attributes = do_attributes_exist( ).
187
186
@@ -299,7 +298,7 @@ CLASS Y_CHECK_BASE IMPLEMENTATION.
299
298
check_configuration-object_creation_date = settings-object_created_on.
300
299
check_configuration-prio = settings-prio.
301
300
check_configuration-threshold = settings-threshold.
302
- check_configuration-allow_pseudo_comments = settings-allow_pseudo_comments.
301
+
303
302
APPEND check_configuration TO check_configurations.
304
303
ENDIF .
305
304
EXPORT
@@ -308,7 +307,6 @@ CLASS Y_CHECK_BASE IMPLEMENTATION.
308
307
threshold = check_configuration-threshold
309
308
apply_on_productive_code = check_configuration-apply_on_productive_code
310
309
apply_on_testcode = check_configuration-apply_on_testcode
311
- allow_pseudo_comments = check_configuration-allow_pseudo_comments
312
310
TO DATA BUFFER p_attributes.
313
311
ENDMETHOD .
314
312
@@ -514,7 +512,6 @@ CLASS Y_CHECK_BASE IMPLEMENTATION.
514
512
check_configuration-apply_on_productive_code = settings-apply_on_productive_code.
515
513
check_configuration-apply_on_testcode = settings-apply_on_test_code.
516
514
check_configuration-threshold = settings-threshold.
517
- check_configuration-allow_pseudo_comments = settings-allow_pseudo_comments.
518
515
ENDIF .
519
516
520
517
INSERT VALUE #(
@@ -553,14 +550,6 @@ CLASS Y_CHECK_BASE IMPLEMENTATION.
553
550
) INTO TABLE sci_attributes.
554
551
ENDIF .
555
552
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
-
564
553
title = description.
565
554
566
555
attributes_ok = abap_false .
@@ -608,7 +597,7 @@ CLASS Y_CHECK_BASE IMPLEMENTATION.
608
597
ENDIF .
609
598
610
599
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( ).
612
601
ENDIF .
613
602
614
603
IF test_code_detector IS NOT BOUND .
@@ -649,7 +638,6 @@ CLASS Y_CHECK_BASE IMPLEMENTATION.
649
638
threshold = check_configuration-threshold
650
639
apply_on_productive_code = check_configuration-apply_on_productive_code
651
640
apply_on_testcode = check_configuration-apply_on_testcode
652
- allow_pseudo_comments = check_configuration-allow_pseudo_comments
653
641
FROM DATA BUFFER p_attributes.
654
642
APPEND check_configuration TO check_configurations.
655
643
CATCH cx_root. "#EC NEED_CX_ROOT
@@ -659,15 +647,12 @@ CLASS Y_CHECK_BASE IMPLEMENTATION.
659
647
660
648
661
649
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
-
665
650
statistics->collect( kind = error_priority
666
651
pc = NEW y_pseudo_comment_detector( )->is_pseudo_comment( ref_scan_manager = ref_scan_manager
667
652
scimessages = scimessages
668
653
test = myname
669
654
code = get_code( error_priority )
670
- suppress = pseudo_comment
655
+ suppress = settings- pseudo_comment
671
656
position = statement_index ) ).
672
657
673
658
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.
680
665
p_kind = error_priority
681
666
p_test = myname
682
667
p_code = get_code( error_priority )
683
- p_suppress = pseudo_comment
668
+ p_suppress = settings- pseudo_comment
684
669
p_param_1 = parameter_01
685
670
p_param_2 = parameter_02
686
671
p_param_3 = parameter_03
687
672
p_param_4 = parameter_04
688
673
p_inclspec = is_include_specific
689
674
p_detail = additional_information
690
- p_checksum_1 = checksum ).
675
+ p_checksum_1 = checksum
676
+ p_comments = pseudo_comments ).
691
677
ENDIF .
678
+
692
679
ENDMETHOD .
693
680
694
681
@@ -810,4 +797,6 @@ CLASS Y_CHECK_BASE IMPLEMENTATION.
810
797
result = abap_true .
811
798
ENDTRY .
812
799
ENDMETHOD .
800
+
801
+
813
802
ENDCLASS .
0 commit comments