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
{{ message }}
Repository navigation
"Standardize empty lines within methods" deletes lines when applied but let them live in profile settings #195
I have a problem with the rule "Standardize empty lines within methods" deleting lines in code when the ABAP Cleaner runs - the same code behaves different when pasted in the configuration window.
Here is the code in the configuration window:
I'd like to preserve the 2 empty lines (row-nr. 4 and 5) between DATA and the FREE-statement so I set the "Max. empty lines within methods"-parameter to 2.
It looks like the lines would be preserve BUT
as soon as I run the ABAP Cleaner one of the lines get deleted.
that's a good point – this is done by the rule "Rearrange local declarations" (even if it has nothing to rearrange in this case). It would indeed be better if "Rearrange local declarations" observed the setting from "Standardize empty lines within methods"!
Another issue is that if "Rearrange local declarations" changes something (even the number of line breaks), it should be displayed in the "Rule Used in Current Selection" list in the main window, which was not the case when I tried the scenario.
there is no parameter for this in "Rearrange local declarations" – but I now changed the rule to simply keep multiple empty lines if they are found in such cases, so this will be fixed with the next release.
Activity
jmgrassau commentedon Nov 11, 2023
Hi Vlad,
that's a good point – this is done by the rule "Rearrange local declarations" (even if it has nothing to rearrange in this case). It would indeed be better if "Rearrange local declarations" observed the setting from "Standardize empty lines within methods"!
Another issue is that if "Rearrange local declarations" changes something (even the number of line breaks), it should be displayed in the "Rule Used in Current Selection" list in the main window, which was not the case when I tried the scenario.
Kind regards,
Jörg-Michael
VladGhitulescu commentedon Nov 11, 2023
Hi JM,
which parameter of "Rearrange local declarations" does this?
Regards,
Vlad
jmgrassau commentedon Nov 12, 2023
Hi Vlad,
there is no parameter for this in "Rearrange local declarations" – but I now changed the rule to simply keep multiple empty lines if they are found in such cases, so this will be fixed with the next release.
Kind regards,
Jörg-Michael
VladGhitulescu commentedon Nov 12, 2023
Thanks JM!
fix LocalDeclarationOrderRule for multiple empty lines (SAP#195)
fix LocalDeclarationOrderRule for multiple empty lines (#195)
jmgrassau commentedon Nov 13, 2023
Hi Vlad,
this should now be fixed with version 1.11.1, which was just released!
Kind regards,
Jörg-Michael