Find if (x) { return … } else { … } patterns

Proprietary

When the if branch returns, the else is unreachable as a fall-through guard — the body after the else can be moved out of the else block, which makes the early-return shape obvious to readers.

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