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

Single line TYPES: statements do not always have the colon removed

Open matthewdjb opened this issue 1 year ago • 1 comments

Single line TYPES: statements do not always have the colon removed

For example

TYPES: BEGIN OF ty_test.
             INCLUDE TYPE mara.
    TYPES:   a_field TYPE abap_bool.
    TYPES: END OF ty_test.

The colons are not removed after keyword TYPES.

matthewdjb avatar Aug 21 '24 07:08 matthewdjb

Hi Matthew,

this is intentional – ABAP cleaner would be fine without colons as well …

    TYPES BEGIN OF ty_test.
            INCLUDE TYPE mara.
    TYPES   a_field TYPE abap_bool.
    TYPES END OF ty_test.

… but if someone then uses PrettyPrinter on this, you get:

    TYPES BEGIN OF ty_test.
    INCLUDE TYPE mara.
    TYPES   a_field TYPE abap_bool.
    TYPES END OF ty_test.

This doesn't happen with colons, and that's why in this special case, ABAP cleaner keeps the colons.

Kind regards, Jörg-Michael

jmgrassau avatar Aug 21 '24 13:08 jmgrassau