`RemoveUnused(Local)Parameter/RemoveUnusedParameters`
What problem are you trying to solve?
- https://github.com/spring-projects/spring-boot/pull/47694
- https://errorprone.info/bugpattern/UnusedVariable
It seems this one the missing in the "gang of four" handling all unused stuff.
- https://docs.openrewrite.org/recipes/staticanalysis/removeunusedprivatemethods
- https://docs.openrewrite.org/recipes/staticanalysis/removeunusedlocalvariables
- https://docs.openrewrite.org/recipes/staticanalysis/removeunusedprivatefields
Checking into localvars and fields it seems parameters are not taken care yet.
It should simply remove as happy path. Maybe some hybrid mode via opt in switch would help to keep public api stable by changing the name to unused to pass inspection and dont make a breaking change on top lvl.
Describe the solution you'd like
Have you considered any alternatives or workarounds?
Additional context
Are you interested in contributing this feature to OpenRewrite?
- https://github.com/openrewrite/rewrite-static-analysis/pull/560
Kindly asking if this is something you would like to pick up as well. @JarvisCraft
Assuming it's just a polish and final touch needed to fix the new recipe. For sure your skillful approach will make this work. Tim and the community are very supportive if there are some details needed. Thinking about you as I'm assuming we also need this kind of adjustment in rewrite, as we sometimes wipe out JUnit stuff as well.
- https://github.com/google/error-prone/pull/5210
Thanks.