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

dimsuz

12/15/2021, 5:27 PM
I have detekt configured in a
kts
file like this:
Copy code
subprojects {
  apply(plugin = "io.gitlab.arturbosch.detekt")

  tasks.withType<io.gitlab.arturbosch.detekt.Detekt>() {
    config.setFrom(files(rootProject.file("detekt-config.yml")))
  }
}
And when I run this with either
detektMain
or
detektDebug
(i.e. with Type Resolution), my detekt-config is not being read, because rules I have disabled are actually used and my custom rule set is not used. But if I run without type resolution:
detekt
, then it works and sees the config. Is this a known issue? Detekt is
1.19.0
g

gammax

12/15/2021, 6:17 PM
mmm nope it doesnt’ sound like a know issue. Do you have a reproducer?
d

dimsuz

12/15/2021, 6:19 PM
I will try to create one
Maybe this was related to the KMM. Not reproducing anymore.
👍 1
Oh, I've managed to reproduce it again, this time 100% and with a sample project: https://github.com/detekt/detekt/issues/4380
g

gammax

12/17/2021, 3:28 PM
Thank you will look into it 👍
💪 1
10 Views