1

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
Eugene
  • 374
  • 1
  • 2
  • 10

0 Answers0