Skip to content

Align SELECT...FROM...JOIN #332

New issue

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

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

Already on GitHub? # to your account

Closed
JoachimEck opened this issue Jun 26, 2024 · 2 comments
Closed

Align SELECT...FROM...JOIN #332

JoachimEck opened this issue Jun 26, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@JoachimEck
Copy link

Hey,

I think something is not rigth with the "Align SELECT ... FROM ... JOIN" rule. I was wondering why the Cleaner kept messing up the formatting in a SELECT.
I'm using version 1.16.2.

  1. align AS always seems to be done, regardless of the checkbox image image

  2. if I turn on the checkbox for the "Align ON", then it moves the ON behind the upper ON condition. If the checkbox is off, then it does what I would have expected if the checkbox was on image image

Maybe I just misinterpreted the options and everything is as it should be 😄

 SELECT *
      FROM test
           JOIN join_one ON test~aufnr = jo~aufnr
           JOIN join_two 		
		    			ON  test~aufnr = jt~aufnr
										AND test~werks = jt~werks
      INTO CORRESPONDING FIELDS OF TABLE @lt_table. 

Here is my profile: profile.zip

Best regards,
Joachim

@jmgrassau jmgrassau added the bug Something isn't working label Jun 26, 2024
@jmgrassau jmgrassau self-assigned this Jun 26, 2024
@jmgrassau
Copy link
Member

Hi Joachim,

thanks a lot for reporting this – ABAP cleaner didn't correctly determine the end of first the logical expressions here (ON …), which only happened if it was followed by JOIN (rather than INNER JOIN, LEFT|RIGHT OUTER JOIN, CROSS JOIN). This will be fixed with the next release, and with that, the options should work as expected.

image

image

Kind regards,
Jörg-Michael

jmgrassau added a commit to jmgrassau/abap-cleaner that referenced this issue Jul 8, 2024
@jmgrassau
Copy link
Member

Hi Joachim,

thanks again for reporting this issue – this should now be fixed with version 1.18.0, which was just released!

Kind regards,
Jörg-Michael

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants