-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Consider comments when searching for multiline annotations #499
Conversation
https://kotlinlang.org/docs/reference/coding-conventions.html#annotation-formatting says
so yes, it does seem like this should apply to multiple annotations or annotations with arguments. |
...ruleset-standard/src/test/kotlin/com/pinterest/ktlint/ruleset/standard/AnnotationRuleTest.kt
Outdated
Show resolved
Hide resolved
99fe6b0
to
8ba310f
Compare
Yep, the statement is alright then with |
…rdless of a comment
63897da
to
ef81f8f
Compare
…#499) * Consider comments when searching for multiline annotations * Make sure the annotated statement is really not on the same line regardless of a comment
Hello! Sorry to be digging up an old PR, but is it possible to allow multiple annotations with comments? For example, this is failing: @Annotation1 // comment 1
@Annotation2 // comment 2
class MyClass {
} with this error:
|
Great, thanks! I'll wait for that to be merged & released 👍 |
Closes #498
Edit: Well after reading the property name again, do we want single parameter annotations also be on separate lines?
Imo the checks need a
it.valueParameters.size > 1
.