-
Notifications
You must be signed in to change notification settings - Fork 512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AnnotationOnSeparateLine false positive #2852
Comments
I see where you're coming from. The way how to write this construct is however a library specific preference. Ktlint can/will not make exceptions for specific library annotations. But I can see that this is a construct that might be heavily used in certain classes, which would lead to reduced readability. Best I can do, is to consider a configuration option in which you can list the annotations that should be ignored from this rule. Or you can just simply disable the rule entirely. See https://pinterest.github.io/ktlint/latest/faq/#how-do-i-enable-or-disable-a-rule |
As far as I see now rule doesn't follow own description. From the rule description:
In my case there is single annotation ( |
LOL. If you take quotes from the docs, you might better want to include the full quote:
Disabling the rule is how you can move forward at this moment, without being bothered by the formatting. Once the rule is made configurable, you can re-enable the rule and add this annotation to the exclude list. |
Room has @MapColumn that can be used to specify column that should be used as map key.
AnnotationOnSeparateLine
triggers for such code, and in my opinion it's false positive, because there is only one annotation for the type, which is allowed by the rule description.Steps to Reproduce
Your Environment
The text was updated successfully, but these errors were encountered: