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

infix-spacing #2459

Closed
mklnwt opened this issue Dec 23, 2023 · 1 comment · Fixed by #2473
Closed

infix-spacing #2459

mklnwt opened this issue Dec 23, 2023 · 1 comment · Fixed by #2473
Milestone

Comments

@mklnwt
Copy link

mklnwt commented Dec 23, 2023

every { foo() } returns(bar)

Expected Rule behavior

every { foo() } returns (bar)

Additional information

  • Current version of ktlint: 1.1.0
@paul-dingemans paul-dingemans added this to the 1.2 milestone Dec 23, 2023
paul-dingemans added a commit that referenced this issue Dec 29, 2023
If an operation reference contains an identifier, then it is used in a DSL notation in which the identifier should be separated with a from a parenthesized expression to avoid confusion with a function call. E.g. format as `every { foo() } returns (bar) andThen (baz)`

Offsets for operators having length 2 or more, and not followed by single space were incorrect as length of the operator was not taken into account.

Closes #2459
@paul-dingemans
Copy link
Collaborator

No new rule was needed. It fits nicely in existing rule spacing-around-operators.

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

Successfully merging a pull request may close this issue.

2 participants