When I run detekt in type resolution mode, it also...
# detekt
d
When I run detekt in type resolution mode, it also check generated sources (for example I use an "sqldelight" library and it generates stuff in
build/generated/sqldelight/code.../SomeFile.kt
and Detekt analyzes it and prints errors. How should I instruct it to ignore
build/generated
? I recall there was some config option in gradle plugin, but cannot find it in the manual, maybe it got deprecated/removed.
h
I use this:
Copy code
tasks {
    fun SourceTask.config() {
        include("**/*.kt")
        exclude("**/*.kts")
        exclude("**/resources/**")
        exclude("**/generated/**")
        exclude("**/build/**")
    }
    withType<DetektCreateBaselineTask>().configureEach {
        config()
    }
    withType<Detekt>().configureEach {
        config()

        reports {
            sarif.required.set(true)
        }
    }
}
d
Thanks! I will try it.