Find clone overrides

Proprietary

Marks a no-argument clone() declared in a class, interface or record, which overrides Object#clone(). clone bypasses constructors and makes a shallow copy; a copy constructor or static copy factory is safer. Not marked: a clone whose body only throws, which disables a supertype's cloning; a clone in a type whose supertypes declare clone() abstract, since that declaration calls for it; and test sources.

io.moderne.staticanalysis.FindCloneOverride
mod run . --recipe=io.moderne.staticanalysis.FindCloneOverride

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