# detekt

Mike Wolfson

10/25/2021, 5:55 PM
Hi folks, I am seeing a weird thing, running
but switched to
and saw the same thing. I am seeing a weird thing, where when I get my Detekt issues down to 0, the configuration file seems to get ignored... I mean if I have at least 1 error, I will see it, but and as soon as I fix it - so I am down to 0 issues, Detekt seems to ignore my config file (and I see ALL the issues I have carefully Suppressed) My detekt config:
Copy code
apply plugin: "io.gitlab.arturbosch.detekt"

detekt {
    toolVersion = detekt_version
    buildUponDefaultConfig = true
    autoCorrect = true
    source = files("$projectDir")
    config = files("$projectDir/analysis/detekt/detekt.yml")
    parallel = true

    reports {
        html.enabled = true
        xml.enabled = false
        txt.enabled = false
Is there some default value I need to set to change this functionality? I feel like this must be something I have configured wrong, since I can see this in
(so it is not likely a bug, or this would be a bigger deal.
Here is the terminal Output showing good build with at least 1 error, then the next build with ALL the errors back
Also, I noticed the HTML report shows 0 errors, so it is only Gradle failing.
Finally, in case this bit of my config file may help...
Copy code
  maxIssues: 0
  excludeCorrectable: false
  # weights:
  # complexity: 2
  # LongParameterList: 1
  # style: 1
  # comments: 1

  validation: true
  warningsAsErrors: false
  # when writing own rules with new properties, exclude the property path e.g.: 'my_rule_set,.*>.*>[my_property]'
  excludes: ''


10/25/2021, 7:24 PM
That's the first time I see this kind of behavior. As a sanity check, i can say that the way you're setting
is suboptimal, as your specifying projectDir which will include also the build folders and more.
I would either remove the source entirely (and fallback to the default
) Or tweak it a bit
But that should be unrelated to your issue. Having a reproducer would help a lot

Mike Wolfson

10/25/2021, 7:46 PM
I will share that in a PM, thanks Nicola