You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The DOT QUALIFIED EXPRESSION prevents the braces from being added. It works for:
fun foo() {
if (offset.value == 0) headerBackgroundColor()
else headerBackgroundColor()
}
paul-dingemans
changed the title
ktlint -F multiline-if-else rule only adds braces for if statement and not else
No braces added in multiline-if-else with dot qualified expression in else branche
May 25, 2023
Expected Behavior
ktlint -F multiline-if-else rule should add Braces for both
if
andelse
.Observed Behavior
Braces added only for
if
Steps to Reproduce
Write a multiline if/else statement without braces.
Run ktlint -F
Your Environment
.editorconfig
settingsThe text was updated successfully, but these errors were encountered: