Find sealed class declarations that could be sealed interface

Proprietary

A sealed class with no constructor parameters and no fields adds no expressive power over sealed interface. The interface form composes better (allows multiple inheritance, supports data object direct implementation, makes the no-state contract explicit).

org.openrewrite.kotlin.bestpractices.FindSealedClassWithoutStateCandidates$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.bestpractices.FindSealedClassWithoutStateCandidates$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.