-
Notifications
You must be signed in to change notification settings - Fork 39
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 static import of com.google.errorprone.matchers.Matchers
methods
#201
Conversation
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.
Nice one!
" // BUG: Diagnostic contains:", | ||
" private static final Matcher<AnnotationTree> FOO = Matchers.isType(\"org.junit.jupiter.api.Test\");", | ||
"", |
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 propose that we just add Matchers.isType(\"org.junit.jupiter.api.Test\")
to the method m()
below. (The usage doesn't need to be "realistic"; see e.g. the collector definitions.)
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.
In fact: right now most entries aren't tested, so propose that we just drop this. (If/when we have a Pitest mutator that mutates varargs entries we should reconsider there.)
Suggested commit message:
|
40ec911
to
1534572
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 :)
" // BUG: Diagnostic contains:", | ||
" private static final Matcher<AnnotationTree> FOO = Matchers.isType(\"org.junit.jupiter.api.Test\");", | ||
"", |
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.
In fact: right now most entries aren't tested, so propose that we just drop this. (If/when we have a Pitest mutator that mutates varargs entries we should reconsider there.)
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.
Only one violation in the codebase, lovely 😍.
StaticImport
: Add com.google.errorprone.matchers.Matchers
candidates com.google.errorprone.matchers.Matchers
methods
Add
com.google.errorprone.matchers.Matchers
to theStaticImport
check, as methods from this class should always be statically imported.Example:
Suggested commit message: