-
Notifications
You must be signed in to change notification settings - Fork 508
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
AnnotationRule formatting uncertainties #556
Comments
Ah, yeah. I don't think the rule was intended for parameter annotations. We can put up a diff to have it ignore those annotations completely. |
Is there a way to disable the annotation rule? |
@francescocervone |
+1 for this change |
I think readability and following official style are both important. I suggest to create two codestyle (#548), official one and strong one. |
I have a following Retrofit interface:
Running ktlint in
--format
mode gives the following output:Imo, the latter is way less readable. I went through the official styleguide, but I think an annotation with arguments should be allowed for method params (even though not sure that it's applicable for all possible cases).
Also in the
showUser
function, the last two parameters should be placed on different lines (so the with-argument annotation followed by no-argument annotation). Cause otherwise theparameter-list-wrapping
rules kicks in. This is most likely a bug in formatter, right?The text was updated successfully, but these errors were encountered: