Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indentation within WITH ... ENDWITH #98

Closed
AlexMFrank opened this issue Aug 30, 2023 · 2 comments
Closed

Indentation within WITH ... ENDWITH #98

AlexMFrank opened this issue Aug 30, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@AlexMFrank
Copy link

Hi,

The code between WITH ... ENDWITH currently doesn't get indented but is aligned with the WITH and ENDWITH keywords. I'd expect that it would be indented. Between SELECT ... ENDSELECT it is working fine.

Formatted with Pretty Printer (shift+F1):

CLASS zcl_test IMPLEMENTATION.
  METHOD if_oo_adt_classrun~main.
    WITH +a AS ( SELECT * FROM I_Plant ) SELECT * FROM +a INTO @FINAL(row).
      out->write( row ).
    ENDWITH.

    SELECT * FROM I_Plant INTO @FINAL(row2).
      out->write( row2 ).
    ENDSELECT.
  ENDMETHOD.
ENDCLASS.

Formatted with ABAP Cleaner (ctrl+4):

CLASS zcl_test IMPLEMENTATION.
  METHOD if_oo_adt_classrun~main.
    WITH +a AS ( SELECT * FROM I_Plant ) SELECT * FROM +a INTO @FINAL(row).
    out->write( row ).
    ENDWITH.

    SELECT * FROM I_Plant INTO @FINAL(row2).
      out->write( row2 ).
    ENDSELECT.
  ENDMETHOD.
ENDCLASS.

I've used the latest ABAP Cleaner version 1.5.2 with the default profile.

@jmgrassau jmgrassau self-assigned this Sep 2, 2023
@jmgrassau jmgrassau added the bug Something isn't working label Sep 2, 2023
@jmgrassau
Copy link
Member

Hi Alex,

thanks for reporting this! The question whether or not WITH starts a loop (and therefore requires ENDWITH), is not a trivial one, but this issue should be fixed with the next release.

Kind regards,
Jörg-Michael

jmgrassau added a commit to jmgrassau/abap-cleaner that referenced this issue Sep 4, 2023
@jmgrassau
Copy link
Member

Hi Alex,

thanks again for opening this issue! This should now be fixed with version 1.5.3, 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
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants