Find best-practice candidates
ProprietarySearch-only bundle: flags places where a more idiomatic Kotlin spelling is available. Each match shows up as a SearchResult for review; nothing is rewritten automatically because the migration is a judgment call.
org. openrewrite. kotlin. bestpractices. FindBestPracticeCandidates$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. bestpractices. FindBestPracticeCandidates$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.
Recipe list
It runs these recipes, in this order.
- Find class-declaration smells
- Find function-declaration smells
- Find string-construction smells
- Find Boolean-conditional smells
- Find lambda / functional smells
- Find exception-handling smells
- Find scope-function smells
- Find
when-statement smells - Find equality / comparison smells
- Find
lazy { }calls without an explicitLazyThreadSafetyMode - Find wildcard
import a.b.*statements - Find anonymous
object : Interface { override fun … }with a single override - Find chained
!!assertions in a single expression