Replace unused variables with underscore
MSALReplace unused variable declarations with underscore (_) for Java 22+. This includes unused variables in enhanced for loops, catch blocks, and lambda parameters where the variable is never referenced.
org. openrewrite. java. migrate. lang. ReplaceUnusedVariablesWithUnderscoremod run . --recipe= org. openrewrite. java. migrate. lang. ReplaceUnusedVariablesWithUnderscoreInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.