Closed
Description
Per https://kotlinlang.org/docs/coding-conventions.html#control-flow-statements, "In a when statement, if a branch is more than a single line, consider separating it from adjacent case blocks with a blank line"
Unfortunately, ktfmt removes such blank lines.
fun foo() {
when {
1 == 1 -> {
println("The world is working okay")
}
1 > 2 -> {
println("We may be in a parallel universe with different rules, do not proceed")
}
}
}
The blank line between the two cases gets removed, reproducible in https://facebookincubator.github.io/ktfmt/