Detekt VarCouldBeVal rule doesn't seem to work

62 views Asked by At

I've noticed that Detekt doesn't report issues with this code

fun main() {
    var thisCouldBeVal = "this could be val"
    println(thisCouldBeVal)
}

Isn't this a clear case where VarCouldBeVal rule should be triggered, or am I missing something?

Here's a sample project to repro https://github.com/Trixmegist/detekt-test

  • Detekt v1.23.0
  • Kotlin v1.9.0
0

There are 0 answers