Formatting: add line break between '{' and enum entry (KT-28227)
#KT-28227 Fixed
This commit is contained in:
committed by
Nikolay Krasko
parent
7d3de70754
commit
e671318653
@@ -588,6 +588,12 @@ fun createSpacingBuilder(settings: CodeStyleSettings, builderUtil: KotlinSpacing
|
|||||||
createSpacing(spaces)
|
createSpacing(spaces)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inPosition(
|
||||||
|
parent = CLASS_BODY,
|
||||||
|
left = LBRACE,
|
||||||
|
right = ENUM_ENTRY
|
||||||
|
).lineBreakIfLineBreakInParent(numSpacesOtherwise = 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
simple {
|
simple {
|
||||||
|
|||||||
@@ -30,4 +30,14 @@ enum class E8 {
|
|||||||
B // B
|
B // B
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum class E9 {
|
||||||
|
F, S, T
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class E10 {
|
||||||
|
F, S, T;
|
||||||
|
|
||||||
|
val x = 1
|
||||||
|
}
|
||||||
|
|
||||||
// SET_TRUE: KEEP_LINE_BREAKS
|
// SET_TRUE: KEEP_LINE_BREAKS
|
||||||
@@ -32,4 +32,14 @@ enum class E8 {
|
|||||||
B // B
|
B // B
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum class E9 {
|
||||||
|
F, S, T
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class E10 {
|
||||||
|
F, S, T;
|
||||||
|
|
||||||
|
val x = 1
|
||||||
|
}
|
||||||
|
|
||||||
// SET_TRUE: KEEP_LINE_BREAKS
|
// SET_TRUE: KEEP_LINE_BREAKS
|
||||||
@@ -29,4 +29,11 @@ enum class E8 {
|
|||||||
B // B
|
B // B
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum class E9 { F, S, T
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class E10 { F, S, T;
|
||||||
|
val x = 1
|
||||||
|
}
|
||||||
|
|
||||||
// SET_TRUE: KEEP_LINE_BREAKS
|
// SET_TRUE: KEEP_LINE_BREAKS
|
||||||
Reference in New Issue
Block a user