Find runBlocking calls inside suspend functions
ProprietaryrunBlocking inside a suspend function blocks the calling thread until the inner block finishes, defeating cooperative cancellation and pinning a thread that the dispatcher could otherwise reuse. From a suspend context, the block can be inlined or wrapped in withContext(...) instead.
org. openrewrite. kotlin. coroutines. FindRunBlockingInSuspend$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. coroutines. FindRunBlockingInSuspend$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.