Find reactive / coroutine interop hazards

Proprietary

Bridges between Reactor and coroutines that usually point at a missed opportunity: WebClient.bodyToMono(...).block() (use awaitBody<T>()), Mono.deferContextual { } inside a suspend fun (context propagation goes through coroutineContext), and awaitSingle() patterns worth a review.

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

Recipe list

It runs these recipes, in this order.

  1. Find webClient...bodyToMono(X::class).block() chains
  2. Find Mono.deferContextual { ... } inside suspend fun
  3. Find mono.awaitSingle() calls inside Flux/Flow collectors