Find when (x) { A -> … } with a single branch

Proprietary

A single-branch when (x) { A -> … } is the long form of if (x == A) …. The if reads more directly and doesn't suggest the branch list will grow.

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