-
Notifications
You must be signed in to change notification settings - Fork 501
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
If-else brackets compliance #1573
Comments
From a perspective of a consistent code style, I do prefer this as well. It however is not documented explicitly as such in the Kotlin Coding Conventions. As of that it does not fit in the |
Has this been implemented in the last release? I'm currently upgrading detekt in our project to the latest version (1.22.0 which uses ktlint 0.47.1). Now the
that it is missing braces in the |
The behavior of this rules is indeed changed as part of PR #1565 (https://github.com/pinterest/ktlint/pull/1565/files#diff-23102555750e484a7df496237f01c33f59ceca2b0ab415b05de3b05c79c4cd2eR500-R520) |
…e style. This rule enforces consistent usage of braces in all branches of a singe if or if-else-if statement. Closes pinterest#1573
…e style. This rule enforces consistent usage of braces in all branches of a singe if or if-else-if statement. Closes pinterest#1573
@paul-dingemans for me it looks like not solved. |
Please be more specific. What exactly seems incorrect? What are your |
Expected Rule behavior
If one of if/else/else if use braces then all parts must use it
Correct:
Incorrect:
The text was updated successfully, but these errors were encountered: