Find Mono.block() calls in non-test code

Proprietary

Outside of @Test methods, Mono.block() is almost always a bug: it bridges reactive code into a blocking call, defeating the purpose of WebFlux. In Kotlin, the bridge should go the other direction — awaitSingle() from kotlinx-coroutines-reactor.

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