Skip to content

ENUM definitions are not aligned #194

Closed

Description

@kjetil-kilhavn

The following code is not changed at all by ABAP cleaner

    TYPES:
      BEGIN OF ENUM cost_distribution BASE TYPE vrtkz,
        not_distributed VALUE IS INITIAL,
        by_quantity VALUE '1',
        by_percentage VALUE '2',
        by_amount VALUE '3',
      END OF ENUM cost_distribution.

It would make sense that ABAP Cleaner aligns the VALUE parts of ENUMs, for instance as shown below

    TYPES:
      BEGIN OF ENUM cost_distribution BASE TYPE vrtkz,
        not_distributed VALUE IS INITIAL,
        by_quantity     VALUE '1',
        by_percentage   VALUE '2',
        by_amount       VALUE '3',
      END OF ENUM cost_distribution.

Activity

  1. jmgrassau commented on Nov 11, 2023

    @jmgrassau
    Member

    Hi Kjetil,

    good point, thanks for the suggestion! Let me set a "new option" label for now, but we'd have to check whether this should be a new option to the "Align declarations" rule or rather a new cleanup rule.

    Kind regards,
    Jörg-Michael

  2. self-assigned this
    on Dec 30, 2023
  3. jmgrassau commented on Dec 30, 2023

    @jmgrassau
    Member

    Hi Kjetil,

    thanks again for opening this! With the next release, the "Align declarations" rule will have this new option:

    image

    Example:

    image

    Existing one-liners are kept …

    image

    … unless they come with VALUEs:

    image

    Kind regards,
    Jörg-Michael

  4. jmgrassau commented on Jan 5, 2024

    @jmgrassau
    Member

    Hi Kjetil,

    thanks again for pointing this out – alignment of ENUMs should now work with version 1.13.0!

    Kind regards,
    Jörg-Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions