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
Comments not aligned after the line length(80) & declarations surpassing the line length(80) #100
I do see your point, but unfortunately, this is currently a limitation of the tabular alignment in ABAP cleaner: In the cleanup rule "Align declarations", the recently added option…
… only works if the VALUE clause is the last "column" of the to-be-aligned "table". In the case of your example, the line-end comments would be another "column", and that's why the VALUE can't be moved. I shall add some documentation on this:
Regarding issue 2, this is out of scope, because as far as I can see from your second screenshot, these are inline declarations, while the "Align declarations" rule only processes upfront declarations. There is currently no general cleanup rule for exceeded line length or for alignment of line-end comments.
Activity
jmgrassau commentedon Sep 22, 2023
Hi FirdousP,
I do see your point, but unfortunately, this is currently a limitation of the tabular alignment in ABAP cleaner: In the cleanup rule "Align declarations", the recently added option…
… only works if the VALUE clause is the last "column" of the to-be-aligned "table". In the case of your example, the line-end comments would be another "column", and that's why the VALUE can't be moved. I shall add some documentation on this:
Regarding issue 2, this is out of scope, because as far as I can see from your second screenshot, these are inline declarations, while the "Align declarations" rule only processes upfront declarations. There is currently no general cleanup rule for exceeded line length or for alignment of line-end comments.
Kind regards,
Jörg-Michael
ConjuringCoffee commentedon Sep 22, 2023
Adding to the topic of issue 2: Comments at the end of lines are considered bad practice by the Clean ABAP style guide:
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to
add hint on restriction of AlignDeclarationsRule (SAP#100)
add hint on restriction of AlignDeclarationsRule (#100)
jmgrassau commentedon Sep 22, 2023
Hi FirdousP,
sorry there is no better solution for this at the moment – but nevertheless thanks, and at least this limitation is now documented.
Kind regards,
Jörg-Michael