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

Comments go wild ;-) #291

Open
VladGhitulescu opened this issue Apr 12, 2024 · 1 comment
Open

Comments go wild ;-) #291

VladGhitulescu opened this issue Apr 12, 2024 · 1 comment

Comments

@VladGhitulescu
Copy link

VladGhitulescu commented Apr 12, 2024

Hey,

why were this comments positioned so weird by ABAP Cleaner?

CleanShot 2024-04-12 at 20 25 09

Thanks!

Regards,
Vlad

@jmgrassau jmgrassau added the enhancement New feature or request label May 30, 2024
@jmgrassau
Copy link
Member

Hi Vlad,

yes, I've seen this behavior sometimes, too. Actually, the styleguide discourages comments at line end altogether (Put comments before the statement they relate to), but admittedly, IMHO, they do sometimes make sense.

Unfortunately, it would be rather complicated to make every single ABAP cleaner rule that changes indentation or inner spaces in the code care about the effects on possible comments at line end, too. However, I could try to add a rule that remembers blocks of aligned comments before the cleanup, and then afterwards ensures that they are still en bloc after the cleanup. What complicates things is that sometimes, you see such blocks across multiple statements, so we'd somehow have to determine where such a 'block' starts and ends.

Kind regards,
Jörg-Michael

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

No branches or pull requests

2 participants