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

Feature request: Alignment of multi-line string concatenation

Open ConjuringCoffee opened this issue 2 years ago • 1 comments

Hi Jörg-Michael, I'd like to request a new rule to align multi-line string concatenation. 🙂

Clean ABAP has the rule "Use | to assemble text", but that doesn't make the string concatenation operator && entirely obsolete. It is still required when longer strings are concatenated. Splitting the concatenation onto multiple lines makes sense then.

Simple example:

lv_result = lv_result
    && cl_abap_char_utilities=>newline
                && |test { lv_var }|.

Here's my expectation:

lv_result = lv_result
         && cl_abap_char_utilities=>newline
         && |test { lv_var }|.

What do you think about this? Thank you for all your effort 🚀

ConjuringCoffee avatar Nov 29 '23 15:11 ConjuringCoffee

Hi ConjuringCoffee,

very nice idea, I've done this very alignment manually so many times!

Kind regards, Jörg-Michael

jmgrassau avatar Dec 30 '23 07:12 jmgrassau