Find run { } calls with an empty body

Proprietary

run { } is a scope function for evaluating a block as an expression with an implicit this receiver. If the block is empty, the call evaluates to Unit and does nothing — drop it.

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