Formatting: add line break between '{' and enum entry (KT-28227)

#KT-28227 Fixed
This commit is contained in:
Toshiaki Kameyama
2018-11-16 12:09:57 +03:00
committed by Nikolay Krasko
parent 7d3de70754
commit e671318653
4 changed files with 33 additions and 0 deletions
@@ -588,6 +588,12 @@ fun createSpacingBuilder(settings: CodeStyleSettings, builderUtil: KotlinSpacing
createSpacing(spaces)
}
}
inPosition(
parent = CLASS_BODY,
left = LBRACE,
right = ENUM_ENTRY
).lineBreakIfLineBreakInParent(numSpacesOtherwise = 1)
}
simple {
@@ -30,4 +30,14 @@ enum class E8 {
B // B
}
enum class E9 {
F, S, T
}
enum class E10 {
F, S, T;
val x = 1
}
// SET_TRUE: KEEP_LINE_BREAKS
@@ -32,4 +32,14 @@ enum class E8 {
B // B
}
enum class E9 {
F, S, T
}
enum class E10 {
F, S, T;
val x = 1
}
// SET_TRUE: KEEP_LINE_BREAKS
@@ -29,4 +29,11 @@ enum class E8 {
B // B
}
enum class E9 { F, S, T
}
enum class E10 { F, S, T;
val x = 1
}
// SET_TRUE: KEEP_LINE_BREAKS