I'm unable to exclude generated files by Apollo cl...
# detekt
j
I'm unable to exclude generated files by Apollo client. My setup:
Copy code
tasks.withType<Detekt>().configureEach {
    exclude("**/generated/**")
}
But running
:mymodule:detektDebugUnitTest
still reports issues in those generated files. However, it seem to be the difference between the simple
:mymodule:detekt
task. What I'm doing wrong?
/Users/hrach/storage/redacted/build/generated/source/apolloTest/redacted/UserDataQuery_TestBuilder.kt:253:98: Unexpected indentation (18) (should be 14) [Indentation]
j
Can you try something like that:
Copy code
tasks.withType<Detekt>().configureEach {
    exclude { it.file.path.contains("build") }
}
That works in our setup.
j
Oh yes, that works, thanks a lot.