Formatting: Move '}' to next line in when

This commit is contained in:
Nikolay Krasko
2014-06-24 14:49:29 +04:00
parent 0716b09920
commit 513ec93060
4 changed files with 9 additions and 0 deletions
@@ -259,6 +259,7 @@ fun createSpacingBuilder(settings: CodeStyleSettings): KotlinSpacingBuilder {
afterInside(LBRACE, BLOCK).lineBreakInCode()
beforeInside(RBRACE, CLASS_BODY).lineBreakInCode()
beforeInside(RBRACE, BLOCK).lineBreakInCode()
beforeInside(RBRACE, WHEN).lineBreakInCode()
between(RPAR, BODY).spaces(1)
// if when entry has block, spacing after arrow should be set by lbrace rule
@@ -28,6 +28,9 @@ fun some(x: Any) {
when (true) {
}
when {
}
}
// SET_FALSE: ALIGN_IN_COLUMNS_CASE_BRANCH
+3
View File
@@ -28,6 +28,9 @@ fun some(x: Any) {
when (true) {
}
when {
}
}
// SET_FALSE: ALIGN_IN_COLUMNS_CASE_BRANCH
+2
View File
@@ -39,6 +39,8 @@ else->1
{
}
when {}
}
// SET_FALSE: ALIGN_IN_COLUMNS_CASE_BRANCH