Skip to content

Bug: "prefer_is_not..." in combination with "move and/or..." breaks when comments are present #88

Closed

Description

@openPhiL

hi.
We found this behavior:
image

-> the second NOT was not moved to after the variable because there was a comment in the first line.

This is the code to reproduce the error:

REPORT zbug_cleaner.
DATA variable1 TYPE string.
DATA variable2 TYPE string.
DATA variable3 TYPE string.

IF NOT variable1 IS INITIAL AND   " comment
   NOT variable2 IS INITIAL AND
   NOT variable3 IS INITIAL.

ENDIF.

without the comment, it looks good:
image

Activity

  1. self-assigned this
    on Aug 15, 2023
  2. jmgrassau commented on Aug 15, 2023

    @jmgrassau
    Member

    Hi openPhil,

    thanks for this issue! Yes, the fact that any number of comments could appear anywhere within the statement can be a bit difficult to consider in the alignment rules, but this should be fixed with the next release:

    image

    Kind regards,
    Jörg-Michael

  3. jmgrassau commented on Aug 15, 2023

    @jmgrassau
    Member

    Hi openPhiL,

    thanks again – this should now be fixed with version 1.5.2 which was just released!

    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

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions