Find GlobalScope.produce calls

Proprietary

GlobalScope.produce { } returns an unscoped ReceiveChannel that keeps running until its producer block returns. Anchor the channel to a scope owned by the surrounding lifecycle.

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