cesards
08/03/2022, 3:40 PMexcludes: &generatedCode
to exclude generated code from each of the rules that apply.
I thought there might be a way nowadays to exclude generated code from all rules so after looking into it, I found a closed issue about the topic:
https://github.com/detekt/detekt/issues/4743
so I went with:
detekt {
source = files("src/main/kotlin", "src/test/kotlin", "src/androidTest/kotlin")
}
but that didn’t make it.
I saw another dev asking about this about two months ago but I’m not sure it got resolved: https://kotlinlang.slack.com/archives/C88E12QH4/p1654877805110359
I also landed on another thread where Nicola brought up:
Yeah I believe thehas no effect because we changed how we collect the source sets.exclude
You’ll have to exclude using a like a package path or so. What happens is that excluded are computed for relative paths that are provided by the sourcesset from AGPI’m not sure I completely follow the implications of the changes. I could assume this is a generic issue for most of us. Any chance you could share how you deal with this, if that’s the case? Thanks in advance 🙏
cesards
08/04/2022, 11:23 AMexcludes
at a Rule Set level:
style:
excludes: [ '**/build/**' ]
Brais Gabin
08/07/2022, 8:36 PMcesards
08/08/2022, 11:31 PMHow is your configuration?What’s the context? What do you want to know? Our config is mostly based on yours. I don’t think there’s anything in the config that excludes generated code, is there? And I don’t expect to be able to configure that from the Gradle Plugin since Gradle works under
/src
which is outside the scope.cesards
08/08/2022, 11:32 PMWhich gradle task do you run?
./gradlew detektBaselineMain
Peter Mandeljc
09/30/2022, 1:47 PM