fix: support implicit @MethodSource to UnusedMethod#5210
fix: support implicit @MethodSource to UnusedMethod#5210JarvisCraft wants to merge 1 commit intogoogle:masterfrom
@MethodSource to UnusedMethod#5210Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
e74fbe1 to
f67790b
Compare
f67790b to
457c855
Compare
|
Hi @cushon, @graememorgan; could you please run the CI on this PR? |
|
nice plz include There will be new stuff to come for sure. right @marcphilipp? thank you.
|
|
@Pankraz76 |
| // normalizing unset value to the empty value | ||
| .map(a -> getAnnotationValue(a, "value") | ||
| .map(y -> asStrings(y).map(state::getName).map(Name::toString).collect(toImmutableSet())) | ||
| .orElse(ImmutableSet.of()) |
There was a problem hiding this comment.
nit: could this be .orElse(ImmutableSet.of(sym.name.toString())) instead of separately checking of names is empty below?
There was a problem hiding this comment.
It couldn't, since we also want to handle the case @MethodSource({})
cushon
left a comment
There was a problem hiding this comment.
Thanks, looks good overall!
Currently,
UnusedMethodcheck does not recognize implicitly referenced JUnit@MethodSource, e.g. the ones which are derived from test method name when none are specified explicitly. This PR fixes this issue.Fixes #5289