We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Ktlint allows the following formatting
fun funA() { if (conditionA()) { doSomething() } else if (conditionB()) { doAnotherThing() } }
there is real example
From my point of view, such formatting is a bit confusing (second if can be perceived as completely independent)
if
Proposal 1 Forbid line break between else and if
else
Proposal 2 (doesn't make sense, if first proposal is accepted) Teach indentionRule to enforce indent after else
indentionRule
Personally, I would prefer the first one. I'm happy to implement it, if such PR is welcome.
The text was updated successfully, but these errors were encountered:
First proposal looks reasonable (and consistent with https://android.github.io/kotlin-guides/style.html examples).
Go ahead (and thank you 🙇♂️).
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Ktlint allows the following formatting
there is real example
From my point of view, such formatting is a bit confusing (second
if
can be perceived as completely independent)Proposal 1
Forbid line break between
else
andif
Proposal 2 (doesn't make sense, if first proposal is accepted)
Teach
indentionRule
to enforce indent afterelse
Personally, I would prefer the first one. I'm happy to implement it, if such PR is welcome.
The text was updated successfully, but these errors were encountered: