Skip to content

Bugfixes we can catch

Nariman Abdullin edited this page Jun 29, 2022 · 7 revisions
  1. Name shadowing can cause following issues. There should be no shadowing.

infinite loop:

fun main() {
        var x = 0
        while (x < 10) {
            var x = 0
            x++
        }
}

bugs in logic:

class A {
    val myVariable = "hello"
    fun foo() {
        val myVariable = "hi"
        println(myVariable)
    }
}

2. run blocking Some people occasionally use runBlocking coroutine in asynchronous code. We need to have a warning for it #691

  1. When designing a base class, you should therefore avoid using open members in the constructors, property initializers, and init blocks.

  2. Detect cases when final operation is called for Mono<Mono<?>>, Mono<Flux<?>> or Flux<Mono<?>> -- it doesn't calculate inner publisher object. It requires to be able to resolve types during validation (compiler plugin)