-
Notifications
You must be signed in to change notification settings - Fork 7
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
Support additional Refaster features seen in error-prone-support #47
Comments
Hey @timtebeek! The |
Thanks for that context! Right now we skip any rules where that annotation is present, but it seems like we can tolerate the presence of that annotation and just generate the recipes in those cases. Good to know! |
Even if we ignore the presence of |
@timtebeek I think we can. I thought the template code is already being generated with all fully qualified references (regardless if the input uses qualified references or not). That was in any case the idea. |
Exploring the addition of new static imports now in this PR; based on what we do versus need it looks like we have some work to do still. |
Some quick stats on why various refaster rules were excluded, such that we know what to cover next:
|
Basic generics support is available. Not yet for gwneric type variables, however. |
With Knut's support for generics and a very minor new exclusion, these are the new stats with regards to what's supported/skipped:
All together we now generate 442 before templates; for 298 after templates. |
As discussed yesterday with @rickie we might want to detect any use of OnlineDocumentation, and if present add a link to that URL in the documentation that we generate, both to give credit and additional context to what a recipe would effectively do. We already parse any JavaDoc that's present (even if it's often missing); we might want to expand (or generate) the Javadocs present in Error Prone Support to improve how those are presented to our users. We might also want to create an aggregate yaml recipe across all Refaster recipes generated, to make it easier to apply all recipes at once. |
About the |
We can also already generate templates for any rules that use |
With #78 we now also have some initial links to the docs for the wrapping outer classes. Possible future improvements are
|
What problem are you trying to solve?
Expand the set of Refaster rules in Error Prone Support that we cover with OpenRewrite recipes.
Describe the solution you'd like
Support the following cases not currently covered.
com.google.errorprone.refaster.Refaster
as seen in EqualityRules.java used ~326 timesreturn Refaster.anyOf(...)
#21@UseImportPolicy
as seen in MockitoRules.java used ~235 timesUseImportPolicy
to cover additional recipes #53@DoNotCall
as seen in TestNGToAssertJRules.java used 3 times@AlsoNegation
as seen in BigDecimalRules.java used ~19 times@Placeholder
as seen in LongStreamRules.java used ~15 times@Repeated
as seen in WebClientRules.java used ~9 times@Matches
&@NotMatches
as seen in ReactorRules.java used ~1 + 2 timesThe text was updated successfully, but these errors were encountered: