Reports two-call chains on the Flow type from kotlinx.coroutines library which are replaceable by a single call.

It can help you to avoid redundant code execution.

The quick-fix replaces the call chain with a single call.

Example:


  fun main() {
      flowOf("1", "2", "Oh").map { it.toIntOrNull() }.filterNotNull()
  }

After the quick-fix is applied:


  fun main() {
      flowOf("1", "2", "Oh").mapNotNull { it.toIntOrNull() }
  }