Closed rafaelaguerra closed 5 years ago
If I use the official sonar-kotlin plugin from https://docs.sonarqube.org/latest/analysis/languages/kotlin/ and apply sonar.kotlin.detekt.reportPaths
, detekts reports unused variable as critical, and sonar rules as minor. Any idea why?
Ok solved.
detekt {
config = files("$rootDir/default-detekt-config.yml")
}
For me it stills a little strange why for sonarLint this is minor, and detekt is critical.
SonarLint is detecting unused local variable locally, but detekt doesn't. Is it normal? Should detekt has more or less the same rules of sonarLint or sonar-kotlin(from sonar)?
Code:
And here is my detekt config file: