-
Notifications
You must be signed in to change notification settings - Fork 509
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
Binary operators in !(...)
not checked for missing horizontal whitespace
#2652
Milestone
Comments
cflee
added a commit
to cflee/ktlint
that referenced
this issue
May 9, 2024
…ry expression Instead of checking for whether any parent element is a KtPrefixExpression, check whether the closest ancestor that is a KtOperationExpression is a KtPrefixExpression. Fixes pinterest#2652
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected Behavior
Given this code:
It should be a lint violation, and formatted to the following to match what IntelliJ does:
Kotlin Coding Conventions: Horizontal whitespace
This rule currently seems to be implemented in SpacingAroundOperatorsRule.
Observed Behavior
No error is thrown during check and it is not formatted.
However, it is working correctly for these cases:
So I am only observing it for the
!( ... )
cases.Steps to Reproduce
Adding this test to SpacingAroundOperatorsRuleTest:
Results in this test failure:
Your Environment
master
branch faf8f66The text was updated successfully, but these errors were encountered: