abap-cleaner icon indicating copy to clipboard operation
abap-cleaner copied to clipboard

Incorrect alignment of the code

Open prokopp80 opened this issue 2 years ago • 3 comments

Hello folks, could you please have a look and check formatting of the code. It is not 100%. Thank you!

image

prokopp80 avatar Oct 30 '23 09:10 prokopp80

Hi prokopp80,

actually that's no defect – what formatting would you have expected? Did you wonder about why "IS NOT BOUND" is not aligned with =, <>, NOT IN?

When aligning logical expressions, ABAP cleaner tries to align lines as long as they have the same "structure". In this case,

  • the first 2 lines and the last 3 lines have the same structure, because they all compare two operands, so their structure is "operand, comparison operator, operand". Therefore, the comparison operators (=, <>, NOT IN) are (right-)aligned, and the two operators are (left-)aligned respectively.
  • The third line, however, only has one operand mo_valuation_rule, so it is not aligned with the other lines.

Kind regards, Jörg-Michael

jmgrassau avatar Oct 31 '23 12:10 jmgrassau

Hi Jörg-Michael, thank you for explaining the difference in formating . Still, I think would be nice to have "an option" to enable to fit the "IS (NOT) BOUND" and similar in the position with other lines. :) What do you think? Of course, minor think, I can live with this formating ... but my eyes still miss the different formatting .

prokopp80 avatar Dec 22 '23 13:12 prokopp80

I will repeat my self ... great work you do with this plug-in ! :) It is more than appreciated!

prokopp80 avatar Dec 22 '23 13:12 prokopp80