Order imports

Apache 2.0

Groups and orders import statements. If a style has been defined, this recipe will order the imports according to that style. If no style is detected, this recipe will default to ordering imports in the same way that IntelliJ IDEA does.

org.openrewrite.java.OrderImports

Optional

removeUnusedBoolean

Remove unnecessary imports.

An OpenRewrite style formatted in YAML.

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

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