for some reason, I'm not able to exclude generated...
# detekt
p
for some reason, I'm not able to exclude generated files from detekt. Any ideas? My root project gradle file is smth like this:
Copy code
subprojects {
    apply(plugin = "io.gitlab.arturbosch.detekt")
    detekt {
        config = files("${rootProject.rootDir}/config/detekt.yml")
        buildUponDefaultConfig = true
        ignoredBuildTypes = listOf("release")
    }
    tasks.withType<DetektCreateBaselineTask>().configureEach {
        exclude("**/generated/**")
    }
    tasks.withType<io.gitlab.arturbosch.detekt.Detekt>().configureEach {
        exclude("**/generated/**")
    }
}
c
Hey @Peter Mandeljc I’m running into the same issue. Did you find a solution?
p
I think I got fed up dealing with gradle magic and gave up 😄
c
haha, me too. I ended up adding
excludes: ['**/build/**']
on each rule
from the build system perspective, it doesn’t seem super feasible to work with generated folders and source folders, since they are on different paths
p
Hm, feels weird that works. Isn't generated/ also another folder, just a bit deeper?