Find fields that are read but never written
ProprietaryMarks a field without an initializer that is read but never assigned, incremented or decremented anywhere in the code that can access it, so every read sees null, 0 or false. That code is the top-level class for a private field or a field of a private class, and the package for a package-private one. Protected and public fields of public classes, final and annotated fields, fields of classes with Lombok annotations, and non-transient fields of serializable classes are not marked, and neither is a field that an unresolved assignment could write.
io. moderne. staticanalysis. FindUnwrittenFieldmod run . --recipe= io. moderne. staticanalysis. FindUnwrittenFieldInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.