Remove unused private fields
MSALIf a private field is declared but not used in the program, it can be considered dead code and should therefore be removed. Dead fields clutter the class, increase its memory footprint, and can mislead developers into thinking they are part of the class's behavior.
org. openrewrite. staticanalysis. RemoveUnusedPrivateFieldsmod run . --recipe= org. openrewrite. staticanalysis. RemoveUnusedPrivateFieldsInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.