Apply Kotlin standard-library idioms

Proprietary

Opinionated bundle of every Kotlin stdlib-shorthand recipe in this module: round-trip elimination, empty-factory preference, and string isBlank/take/drop folds. Complementary to Performance (which focuses on chain collapses) and BestPractices (which focuses on flagging smells).

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

  1. Apply Kotlin collection shorthands
  2. Prefer emptyList() / emptySet() / emptyMap() over zero-arg builders
  3. Apply Kotlin string shorthands