>1 annotation is kept on same line, contrary to style guide
- Dominant language
- Kotlin
- Stars
- 1.3k
- Forks
- 116
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 15
Description
Original code:
```kotlin
@Inject @Foo
var bar: Bar
```
ktfmt removes line break:
```kotlin
@Inject @Foo var bar: Bar
```
Android Kotlin style guide says annotations can only be on the same line as the declaration if there is only annotation (and without arguments): https://developer.android.com/kotlin/style-guide#annotations
Contributor guide
Research direction
Start by reproducing the two Kotlin snippets with ktfmt and compare the output with the Android Kotlin style guide's annotation rules. Trace the formatter's annotation and declaration line-breaking behavior; done means multiple annotations remain separate from the declaration while the single-annotation case continues to follow the formatter's conventions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100