abap-cleaner
abap-cleaner copied to clipboard
Feature Request: remove empty line-break(s) between ENDxxxxs.
Hi. I have this idea that in general, I prefer something like this
if sy-tabix = 1.
if sy-uname = 'Ich'.
loop at itab into data(wa).
...
endloop.
endif.
endif.
over something like this
if sy-tabix = 1.
if sy-uname = 'Ich'.
loop at itab into data(wa).
...
endloop.
endif.
endif.
We already have the option to reduce multiple empty lines to <given number>, but in those specific cases, I mean between all those ends, I would remove "all" empty lines.
I am suggesting those ends:
endif. endloop. enddo. endtry.
Hi openPhiL,
that sounds interesting – however, sometimes I have seen empty lines here for the sake of readability:
IF iv_find_pairs = abap_true.
LOOP AT mts_any INTO DATA(ls_any).
LOOP AT mts_any INTO DATA(ls_other).
IF ls_any-component = ls_other-component.
add_pair( is_first = ls_any
is_second = ls_other ).
ENDIF.
ENDLOOP.
ENDLOOP.
ENDIF.
So how could we be sure to not destroy intended structuring here? Maybe keep cases where an empty line is found after the opening command, too?
Kind regards, Jörg-Michael
I'd support the suggestion by @openPhiL. If someone would like to keep intended structuring, they could disable this rule.
Maybe keep cases where an empty line is found after the opening command, too?
That seems like a good idea to me. 😊