Find callbackFlow { } blocks without an awaitClose { } terminator

Proprietary

callbackFlow { } must end with awaitClose { } to suspend until the consumer cancels. Without it, the producer either completes immediately (silent drop) or throws — the same flow needs to register its cleanup hook in awaitClose { }.

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