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

"Remove needless spaces" doesn't consider spaces between parameter and method parenthesis #185

Open
ConjuringCoffee opened this issue Nov 7, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@ConjuringCoffee
Copy link
Contributor

Hi Jörg-Michael, I found an example that isn't covered by the rule. Is it simply not covered at all, or did I overlook another rule that should have done this?

Example:

    DATA(lo_example) = NEW lcl_example( iv_1 = 1
                                        iv_2 = 1        ).

Expected:

    DATA(lo_example) = NEW lcl_example( iv_1 = 1
                                        iv_2 = 1 ).
@ConjuringCoffee
Copy link
Contributor Author

I'm using the following options:

image

@jmgrassau jmgrassau added the enhancement New feature or request label Nov 9, 2023
@jmgrassau
Copy link
Member

Hi ConjuringCoffee,

that's a good point. One possible place for this would be the "Align parameters and components" rule, but I did not want to condense the space before the closing parenthesis there, because this rule does not consider the context of multiple table rows – and someone may want to keep alignment like this:

  lt_any_table = VALUE #( ( id = 1 name = 'any'       )
                          ( id = 2 name = 'other'     )
                          ( id = 3 name = 'very_long' ) ).

However, "Remove needless spaces" does consider the context above and below, so this rule could actually do this, because it could detect whether or not there are more closing parentheses in the same position that might be aligned intentionally. And in non-table-row cases, I guess there should be no reason to keep multiple spaces before the closing parenthesis anyway.

Kind regards,
Jörg-Michael

@sandraros
Copy link

Possibly related to this eventual new cleanup rule #67.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants