Annotation location on properties
Let me start with I don't know if this is a bug or intentional behavior, but I would like to understand the reasoning behind this behavior.
Assume input:
@get:Rule
val benchmarkRule = BenchmarkRule()
this turns into when using --kotlinlang-style:
@get:Rule val benchmarkRule = BenchmarkRule()
What is the reasoning behind annotations being on the same line?
I see similar behavior on data classes
@Entity
data class EntityWithEnum(
@PrimaryKey
val id: Long,
val fruit: Fruit
)
becomes
@Entity data class EntityWithEnum(@PrimaryKey val id: Long, val fruit: Fruit)
and it seems that putting the annotation on the same line makes it harder to read.
This kind of formatting sometimes bugs me too... However, I don't expect changes anytime soon, see #226 and #395 for further reference. There is a workaround including comments - kind of ugly, but can help readability in some cases.
All that said, I think having consistent formatting outweighs the cost of the occasional style decision I personally don't agree with :)