abap-cleaner
abap-cleaner copied to clipboard
Feature request: Move logic directly after condition (`IF`, `WHEN`) to next line
Hi Jörg-Michael, to avoid problems like in #207 I'd like to request a rule that moves logic directly after a condition to the next line.
Example:
DATA example TYPE string.
IF example = 'when'. call_example( i_1 = 1
i_2 = 2 ).
ENDIF.
Expected:
DATA example TYPE string.
IF example = 'when'.
call_example( i_1 = 1
i_2 = 2 ).
ENDIF.
Maybe this could be considered by a more general rule like "Move statements from one line to multiple lines."
What do you think? 🙂
Hi ConjuringCoffee,
yes, that's a good idea – and also explicitly demanded by the styleguide: No more than one statement per line!
Kind regards, Jörg-Michael