Skip to content

Bad result of Align SORT command ( stand alone cleaner in WINDOWS) #141

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
TMNielsenApS opened this issue Oct 11, 2023 · 5 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@TMNielsenApS
Copy link

Before cleaner :

           SORT: gt_vbep_before BY vbeln posnr edatu,
                 gt_vbep_after  BY edatu.

After cleraner:

           SORT: gt_vbep_before BY vbeln
                                   posnr
                                   edatu,
                                   gt_vbep_after  BY
                                   edatu.
@jmgrassau jmgrassau added the bug Something isn't working label Oct 12, 2023
@jmgrassau
Copy link
Member

Hi Thomas,

thanks a lot for this example! You're right, of course – I shall look into this! I guess the expected result would be

           SORT: gt_vbep_before BY vbeln
                                   posnr
                                   edatu,
                 gt_vbep_after  BY edatu.

so all components are aligned, even if the table names have different length.

Kind regards,
Jörg-Michael

@TMNielsenApS
Copy link
Author

TMNielsenApS commented Oct 12, 2023

Hi Jörg-Michael

Yes that would be the result I prefere, but I am no clean-code expert.

I think maybe other people would prefere this result:

           SORT gt_vbep_before BY vbeln posnr edatu.
           SORT gt_vbep_after  BY edatu.

Regards Thomas

@TMNielsenApS
Copy link
Author

naa - I ment this result:

           SORT gt_vbep_before BY vbeln 
                                  posnr 
                                  edatu.
           SORT gt_vbep_after  BY edatu.

@jmgrassau jmgrassau self-assigned this Oct 16, 2023
@jmgrassau
Copy link
Member

Hi Thomas,

I now enhanced this cleanup rule to consider SORT: chains as well:

image

Note that still only the component lists are aligned, keeping the BY keywords where they are – aligned or unaligned – because with the additions STABLE, ASCENDING/DESCENDING, AS TEXT after the table name, aligning "BY" might create huge gaps:

image

To align everything, we'd need more options to configure what that should look like.

Kind regards,
Jörg-Michael

@jmgrassau
Copy link
Member

Hi Thomas,

thanks again for reporting this bug – this should now be fixed in version 1.7.2, 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