Reports runBlocking calls inside suspend functions.

Using runBlocking within a suspend function negates the suspension mechanism, blocking the calling thread, and undermines the core purpose of asynchronous programming.

The quick-fix automatically replaces the runBlocking with one of the following options, depending on the context:

Example:


suspend fun something() {
  runBlocking {
    code() // The thread is blocked here
  }
}

After the quick-fix is applied:


suspend fun something() {
  runBlocking {
    code() // Runs asynchronously
  }
}

New in 2025.1