-
Notifications
You must be signed in to change notification settings - Fork 134
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
Require meta-annotations with source rentetion for Immutables styles #1727
Conversation
Generate changelog in
|
This PR has been automatically marked as stale because it has not been touched in the last 14 days. If you'd like to keep it open, please leave a comment or add the 'long-lived' label, otherwise it'll be closed in 7 days. |
Would still like a review of this. |
+ "meta-annotation, or add the meta-annotation's fields to your inline @Value.Style " | ||
+ "declaration.") | ||
public final class ImmutablesStyleCollision extends BugChecker implements BugChecker.ClassTreeMatcher { | ||
severity = SeverityLevel.WARNING, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to WARNING so users have an escape hatch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Yeah, makes sense to use WARNING initially. Can always raise this in the future if necessary.
Update
ImmutablesStyleCollision
check to make it stricter by requiring meta-annotations with source retention.Use inline annotations or meta-annotations with other retention policies forces a consumers to add an Immutables annotations compile dependency to avoid compile warnings.
For more details see immutables/immutables#291 - specifically the recommendation not to use inline styles.
We manually made this change in our repos, some examples: