Find getters and setters that access the wrong field
ProprietaryMarks a getter or setter whose name refers to one field but whose body reads or writes a different field of the same class, such as int getX() { return y; } where both x and y are declared. This is often a copy and paste slip, and it is easy to miss in review because the code looks right. Only accessors whose body is the single statement implied by their name are marked, and only when the class declares a private field with the name it refers to, whose type is the accessor's type or a subtype of it. private, static and abstract accessors are not marked, and test sources are not searched.
io. moderne. staticanalysis. FindAccessorOnWrongFieldmod run . --recipe= io. moderne. staticanalysis. FindAccessorOnWrongFieldInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.