Hi, I'm upgrading from 1.23.8 to 2.0.0-alpha.6 an...
# detekt
s
Hi, I'm upgrading from 1.23.8 to 2.0.0-alpha.6 and it seems like unused imports are no longer reported by
./gradlew check
(I've renamed
UnusedImports
to
UnusedImport
and have it explicitly enabled in my
config/detekt.yml
). "UnusedImports" was reported as incorrect config name, and a wildcard import in the same file is also reported, so the general setup seems to work as expected. IntelliJ registers them as "unused import directive". Is this a known issue, am I missing something, or can I provide anything to support further analysis? (env: ktLint-gradle plugin 14.2.0, Gradle 9.8.2, Java 21.0.13.0.2, Kotlin 2.4.21 with jvmToolchain 17 and Kotlin apiVersion/languageVersion 2.2) Edit:
./gradlew detektMain
finds them, so it looks like they require "full" analysis mode now. Is there an easy way to enforce full analysis during
check
? Or how can I analyze why the plugin is not using it by default (the project is jvm only)?
Unfortunately,
detektMain
also finds a false positive unused import for
kotlinx.serialization.json.Json.Default.decodeFromString
so I guess I'll (have to) stick with 1.23.8 for now. Let me know if you want me to open issues, and what details to include there.