SAP / abap-cleaner

ABAP cleaner applies 95+ cleanup rules to ABAP code at a single keystroke
Apache License 2.0
431 stars 48 forks source link

Feature request: Alignment of multi-line string concatenation #218

Open ConjuringCoffee opened 10 months ago

ConjuringCoffee commented 10 months ago

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 🚀

jmgrassau commented 9 months ago

Hi ConjuringCoffee,

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

Kind regards, Jörg-Michael