IntelliJ IDEA introduces several new static inspections for Kotlin coroutines to catch common anti-patterns. The inspections cover: preferring awaitAll()/joinAll() over manual map/forEach loops, using currentCoroutineContext() instead of coroutineContext to avoid scope shadowing, avoiding runBlocking inside suspending
Table of contents
awaitAll() and joinAll()currentCoroutineContext() over coroutineContextrunBlocking inside a suspending functionUnused DeferredJob used as an argument in a coroutine startersuspendCancellableCoroutine instead of suspendCoroutineSuspicious implicit CoroutineScope receiverSimpler operations for flow processingSummarySort: