openrewrite/rewrite-templating

Support additional Refaster features seen in error-prone-support

Open

#47 opened on Dec 17, 2023

 (17 comments) (2 reactions) (0 assignees)Java (9 forks)auto 404
enhancementhelp wanted

Repository metrics

Stars
 (18 stars)
PR merge metrics
 (PR metrics pending)

Description

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 times
    • #21
  • @UseImportPolicy as seen in MockitoRules.java used ~235 times
    • #53
    • #140
  • @DoNotCall as seen in TestNGToAssertJRules.java used 3 times
  • Generic type parameters are currently not supported as seen in ImmutableSortedMapRules.java used ~496 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 times
  • "If statements are currently not supported" used ~8 times
  • "Lambdas are currently not supported" used ~2 times
  • "Method references are currently not supported" used ~1 times
  • Support of exclude templates that contain more than one statement, as the template matching would fail

Contributor guide