-
Notifications
You must be signed in to change notification settings - Fork 2
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
CanIgnoreReturnValueSuggester: Support exempting method annotations #60
Conversation
f6221f0
to
2ae71e5
Compare
@AfterTemplate
methods with @CIRV
Suggested commit message:
|
2ae71e5
to
eb0f56d
Compare
eb0f56d
to
a37e503
Compare
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.
Rebased and added a commit. One can debate whether @CRV
and @CIRV
are "exempting" method annotations, but they do prevent this checker for making a suggestion 🤷
Slightly tweaked the suggested commit message.
|
||
// If the method is annotated with an annotation that is exempted, bail out. | ||
if (additionalExemptingMethodAnnotations.stream() | ||
.anyMatch(annotation -> ASTHelpers.hasAnnotation(methodTree, annotation, state))) { |
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.
We can:
- Statically import this method.
- Use the
MethodSymbol
-accepting overload used above. - Use this
anyMatch
also for the cases mentioned above.
2a87390
to
454bdd4
Compare
Upstream PR: google#4009. |
…tions While there, excempt `@AfterTemplate` methods with analysis.
454bdd4
to
fd25f02
Compare
Upstream PR was merged 👍 |
While there, exempt
@AfterTemplate
methods from analysis.