Remove unused imports

Apache 2.0

Remove imports for types that are not referenced. As a precaution against incorrect changes no imports will be removed from any source where unknown types are referenced.

org.openrewrite.java.RemoveUnusedImports
mod run . --recipe=org.openrewrite.java.RemoveUnusedImports

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.