Comments go wild ;-)
Hey,
why were this comments positioned so weird by ABAP Cleaner?
Thanks!
Regards, Vlad
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