Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZCL_AOC_CHECK_13: Wrong warning message? #1099

Open
sellchris opened this issue Mar 16, 2023 · 4 comments
Open

ZCL_AOC_CHECK_13: Wrong warning message? #1099

sellchris opened this issue Mar 16, 2023 · 4 comments

Comments

@sellchris
Copy link

sellchris commented Mar 16, 2023

Hi,
this class checks for empty lines by checking each class part in a loop. But if the last line of a class part is empty and the first one of the next you get the warning message "Sequential blank lines", but you are not able to get rid of it in eclipse. In some classes I don't have a protected section but RPY_PROGRAM_READ return always an empty line. Also this can lead to this warning message.

Would a "CLEAR lv_seq." in line 17 in methode "check" make sense?

Regard, Chris

@larshp
Copy link
Owner

larshp commented Mar 16, 2023

looks like it default checks for 4 sequential blank lines? https://github.com/larshp/abapOpenChecks/blob/main/src/checks/zcl_aoc_check_13.clas.abap#L80

If its not possible to enforce 1(assuming you have configured it), then change it to 2.

maybe even open an issue for https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#add-a-single-blank-line-to-separate-things-but-not-more in clean-abap, as the editor supported by SAP cannot follow the styleguide

@sellchris
Copy link
Author

In my system MV_LINES is 2 in method check. Not sure where 4 is overwritten. The question to me is if the max empty lines should be applied to EACH part of the class separately, or not?

@larshp
Copy link
Owner

larshp commented Mar 16, 2023

if the reason for applying the check is readability, the readability is for what is shown, the full class is shown in ADT

but anyhow, an additional setting for having the rule to run for each part is welcome in a pull request

@sellchris
Copy link
Author

The full class is shown in the ADT. But a class is stored in different parts:

E.g.:
CL_========CP
CL_
========CCDEF
CL_========CU
CL_
========CO
CL_========CI
CL_
========CCMAC
CL_========CCIMP
CL_
========CCAU
CL_=======CM001
CL_
========CM002

I am not sure how to add a new setting in the framework. Just wanted to get rid of this warning :-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants