-
Notifications
You must be signed in to change notification settings - Fork 56
Description
Dear ABAP Cleaner Community!
I was wondering, if it was possible to include the alignment of pseudo comments into the ABAP Cleaner.
Here is a code example:
SELECT * FROM t000
INTO TABLE @DATA(clients). "#EC CI_SUBRC
LOOP AT clients REFERENCE INTO DATA(client).
client->mandt += 1.
INSERT t000 FROM client->*. "#EC CI_IMUD_NESTED
ENDLOOP.
CALL FUNCTION 'BAL_LOG_MSG_ADD' "#EC CI_SUBRC
EXPORTING i_log_handle = VALUE balloghndl( )
i_s_msg = VALUE bal_s_msg( )
EXCEPTIONS OTHERS = 1.
If I use the Pretty Printer for the above code, following occurs:
- First pseudo comment will get aligned to the right, to end at the 72 column.
- Second pseudo comment will get aligned to the right, to end at the 72 column.
- Third pseudo comment will not get aligned.
- The structure of CALL FUNCTION will get altered.
I don't know any settings for Pretty Printer to influence these changes, and I don't know any pattern for the pseudo comments -- why do some get aligned, and the others not. To have the code consistently formatted though, I would always call the Pretty Printer first, and then the ABAP Cleaner.
For some reasons I don't want to use both tools. But I don't know any ABAP Cleaner settings, to get the pseudo comments aligned.
So now the question! Would it be possible to have an ABAP Cleaner rule to align all pseudo comments? Since some say it's a bug in Pretty Printer that the pseudo comments get aligned to the right, the new rule could have two options:
- align in old style (pseudo comment ends on column 72, unless the line is longer anyway),
- align to the left (just like in the code snippet above).
Many thanks in advance for your input!
Greetings
Michał