You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although the checks are set up for production code only (we exluded the test code for these checks), we keep receiving findings from unit tests.
Expected Behavior
Exclude unit tests from these checks according to the configuration.
Possible solution
In the method IS_STATEMENT_IN_AUNIT_TAB of the class Y_CHECK_BASE it is assumed that the table for unit tests is already filled which is not the case.
TRY.
" Local Test Class
aunit = ref_scan->aunit_tab[ incl_name = include ].
CATCH cx_sy_itab_line_not_found.
" Global Test Class
aunit = ref_scan->aunit_tab[ incl_name = program_name ].
ENDTRY.
One possible solution could be adding
IF ref_scan->aunit_tab_determined = abap_false.
ref_scan->determine_aunit_lines( ).
ENDIF.
into the method INSTANTIATE_OBJECTS of the same class after the verification IF ref_scan IS INITIAL.
The text was updated successfully, but these errors were encountered:
Check Name
Actual Behavior
Expected Behavior
Possible solution
into the method
INSTANTIATE_OBJECTS
of the same class after the verificationIF ref_scan IS INITIAL.
The text was updated successfully, but these errors were encountered: