Remove class variables matching package filter

Proprietary

Removes unused private Java fields and block-local variables in the specified package only when their initializers are absent or literals. Retains externally accessible fields and potentially effectful initializers, reporting candidates for manual cleanup.

io.moderne.java.dropwizard.boot.general.RemoveVariablesByPackage

Required

The package name to filter by. Unused private fields and block-local variables with types in this package (or subpackages) are candidates for safe removal.

When true, only removes class-level field declarations; local variables within methods are left unchanged.

mod run . --recipe=io.moderne.java.dropwizard.boot.general.RemoveVariablesByPackage \ -P packageFilter=com.example.unwanted \ -P removeOnlyClassScope=true

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