Find open class declarations without overridable members

Proprietary

The open modifier on a class only matters if subclasses override something. A bare open class Foo (or one whose members are all final) signals an intent — "this class is meant to be extended" — that the type system can't actually enforce. Either declare specific members open (and drop the class-level open) or remove the modifier entirely.

org.openrewrite.kotlin.bestpractices.FindOpenClassWithoutOverrides$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.bestpractices.FindOpenClassWithoutOverrides$KtRecipe'

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