Find Flux.blockLast() calls outside @Test methods

Proprietary

Flux.blockLast() drains the entire Flux on the calling thread to return the final element. In production code, that's almost never the intent — surface the elements through asFlow().collect { } or call from a coroutine with awaitLast().

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