2021 Mar 11 2:54 PM
Hi experts,
I wanna create a custom check-class for ATC/CI Checks inheriting from class CL_CI_TEST_ABAP_COMP_PROCS (and NOT from CL_CI_TEST_SCAN). With iTab PROC_REFS the class offers a modern way of structuring the abap-objects for the needed checks. Now, I have the requirement to check comments within the abap-objects. The Problem is, that PROC_REFS doesn't contain any comments. Does anybody know, if I can trigger something or set some Customizing which will add the comments to PROC_REFS?
Thanks and regards,
Sebastian
.
2021 Mar 30 8:33 AM
Hello Sebastian,
there is no way to include comments in the COMP_PROCS structures - for one, because they don't fit into the organization of the code into procedures and statements. A comment - in particular a full-line comment starting with asterisks - is not unambiguously associated with a statement and hence it is unclear where exactly one would expect such comments to show up in the analysis structures.
If you need to analyse comments, you need to use the "raw" output of the SCAN statements. In classes inheriting from CL_CI_TEST_ABAP_COMP_PROCS this is available in the SCANS instance attribute if you have set the SCAN_NEEDED attribute in the constructor of your check class.
Kind regards,
Björn
2021 Mar 30 8:33 AM
Hello Sebastian,
there is no way to include comments in the COMP_PROCS structures - for one, because they don't fit into the organization of the code into procedures and statements. A comment - in particular a full-line comment starting with asterisks - is not unambiguously associated with a statement and hence it is unclear where exactly one would expect such comments to show up in the analysis structures.
If you need to analyse comments, you need to use the "raw" output of the SCAN statements. In classes inheriting from CL_CI_TEST_ABAP_COMP_PROCS this is available in the SCANS instance attribute if you have set the SCAN_NEEDED attribute in the constructor of your check class.
Kind regards,
Björn
2021 Mar 31 1:17 PM