https://kotlinlang.org logo
#detekt
Title
d

dimsuz

12/17/2021, 11:58 AM
Do I understand correctly that when running with "type resolution", detekt still should find all errors which are present without type resolution? I have a KMM project and when I run
detekt
I get
UseDataClass
error, but if I run
detektAndroidDebug
on the same module, I get a
BUILD SUCCESSFUL
.
b

Brais Gabin

12/17/2021, 12:02 PM
Yes, detektAndroidDebug should find MORE issues than detekt. It shouldn't be less.
🤔 1
d

dimsuz

12/17/2021, 3:14 PM
Turns out this is related to one of the previous issues I've been writing about here: tasks with type resolution do not read the config yaml file. created an issue with the repro project https://github.com/detekt/detekt/issues/4380
❤️ 1
e

ephemient

12/17/2021, 6:08 PM
yeah I do
Copy code
tasks.withType<​Detekt​>().configureEach {
    config.from(​"​detekt.yml​"​)
}
instead
d

dimsuz

12/18/2021, 5:11 PM
hmm. I do this (in sample project too)
Copy code
tasks.withType<io.gitlab.arturbosch.detekt.Detekt>() {
  config.setFrom(files(rootProject.file("detekt-config.yml")))
}
Do you mean that
files(rootProject.file("detekt-config.yml"))
is the problem here?
5 Views