-
Notifications
You must be signed in to change notification settings - Fork 745
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
Flag unused Refaster template parameters #4060
Flag unused Refaster template parameters #4060
Conversation
@@ -149,6 +149,8 @@ public final class UnusedVariable extends BugChecker implements CompilationUnitT | |||
// TODO(ghm): Find a sensible place to dedupe this with UnnecessarilyVisible. |
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.
If acceptable I don't mind also updating this list. Alternatively we can upstream our RefasterRuleModifiers
check, which normalizes modifier usage by Refaster rule definitions more generally.
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.
If acceptable I don't mind also updating this list.
Thanks, updating the list until we get around to deduping them SGTM
Alternatively we can upstream our
RefasterRuleModifiers
check, which normalizes modifier usage by Refaster rule definitions more generally.
That also sounds good if you have time/interest, but it also doesn't need to block this PR
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, updating the list until we get around to deduping them SGTM
Top; will do.
That also sounds good if you have time/interest, but it also doesn't need to block this PR
I'll make a note to consider this later then ✔️. (When we contributed #3813 and #2232 that caused some issues for downstream users due to a name collision (PicnicSupermarket/error-prone-support#622 and PicnicSupermarket/error-prone-support#686), so maybe this time I'll try to find an alternative name; hehe.)
"com.google.errorprone.refaster.annotation.AfterTemplate", | ||
"com.google.errorprone.refaster.annotation.BeforeTemplate", |
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.
Of this list, currently there's only a test for javax.inject.Inject
, so I didn't add any test cases for these new annotations, either. Let me know if I should. (I did test these changes against a collection of real Refaster templates.)
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.
LG pending the update to UnnecessarilyVisible
@@ -149,6 +149,8 @@ public final class UnusedVariable extends BugChecker implements CompilationUnitT | |||
// TODO(ghm): Find a sensible place to dedupe this with UnnecessarilyVisible. |
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.
If acceptable I don't mind also updating this list.
Thanks, updating the list until we get around to deduping them SGTM
Alternatively we can upstream our
RefasterRuleModifiers
check, which normalizes modifier usage by Refaster rule definitions more generally.
That also sounds good if you have time/interest, but it also doesn't need to block this PR
499e659
to
3fe5040
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 to also update UnnecessarilyVisible
.
@@ -149,6 +149,8 @@ public final class UnusedVariable extends BugChecker implements CompilationUnitT | |||
// TODO(ghm): Find a sensible place to dedupe this with UnnecessarilyVisible. |
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, updating the list until we get around to deduping them SGTM
Top; will do.
That also sounds good if you have time/interest, but it also doesn't need to block this PR
I'll make a note to consider this later then ✔️. (When we contributed #3813 and #2232 that caused some issues for downstream users due to a name collision (PicnicSupermarket/error-prone-support#622 and PicnicSupermarket/error-prone-support#686), so maybe this time I'll try to find an alternative name; hehe.)
No description provided.