-
Notifications
You must be signed in to change notification settings - Fork 870
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
Single argumentless annotation exception from rule 4.8.5 not honored #342
Comments
Also the latest SNAPSHOT build.
|
This comment is related: #318 (comment). The formatter generally doesn't factor the existing formatting in to its decisions. I think the key word in 4.8.5 is may. Both approaches are allowed by the style guide, and the formatter has to make a decision, and in general it prioritizes making a single consistent decision over preserving existing formatting choices. |
Yeah that's fair. And I guess detection of this case just isn't worth it? For me, the pervasiveness of |
(I just cc'd you on a related internal bug.) I think it's still up for debate whether we'd prefer to always leave annotations like |
https://google.github.io/styleguide/javaguide.html#s4.8.5-annotations states:
Given code like
and
GJF formats them like
and
in contradiction to this exception.
While I understand why you might not want to format the own-line style into the single-line style, changing the single-line style to the own-line style when it's already in compliance with the rules seems erroneous.
I'm observing this with version 1.7.
The text was updated successfully, but these errors were encountered: