-
Notifications
You must be signed in to change notification settings - Fork 629
Do not report US_USELESS_SUPPRESSION_ON_METHOD
on generated methods
#3367
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
Conversation
spotbugsTestCases/src/classSamples/lombokAddSuppressFBWarnings/README.md
Outdated
Show resolved
Hide resolved
@@ -32,6 +36,10 @@ | |||
*/ | |||
public final class MemberUtils { | |||
|
|||
private static final String LOMBOK_GENERATED_TYPE = "Llombok/Generated;"; |
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.
There are other Generated annotations for methods. You don't want to add those as well?
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.
I was wondering about that too, see:
if (!MemberUtils.isUserGenerated(m)) { |
this would effectively set the
FOUND_IN_SYNTHETIC_METHOD
property for all these generated methods and adjust (increase) the priority (meaning less important) so the bug instances might be silenced.
I'm not sure what might be the consequences to be honest
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.
Thanks for highlighting it. It's a bit strange, that this one is handled a bit differently, but I think it could be okay like this.
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.
I think that a reasonable plan would be to release a first version only considering Lombok's @Generated
and, if nothing breaks, expand to other similar annotations in a subsequent version
This is a fix for #3350 and should improve the change from #3353