I just noticed that `detektDebug` task doesn't wor...
# detekt
d
I just noticed that
detektDebug
task doesn't work on my CI, because each module gets a
NO-SOURCE
status:
Copy code
Task :feature:catalog:ui:detektDebug NO-SOURCE
But this works and detects issues when I run the same
detektDebug
task locally. Any ideas what might cause this? ~UPD: Can this happen because I run detekt tasks on CI before anything gets compiled?~Nope, doesn't work after compile either. UPD2: Looks like I have found the reason. Our CI builds use gradle remote cache, so all lines which have
NO-SOURCE
, have something like this before them:
Copy code
Task :feature:catalog:ui:compileDebugKotlin FROM-CACHE
And this causes detekt to not run any checks (although there are some failing). Is this a known bug? Can't seem to find it right away on github.
b
No, as far as I know this is not a know bug.
d
I'm not sure how to supply a sample repro project though... Having a remote cache requires a server setup (which we have). I would try to debug this myself, but I'm close to 90% of "he's just fooling around" state when in the realm of gradle plugins 🙂 Wrote a very basic stuff around an existing DSL api and not more...
FYI: it was a silly bug on my part. used this in the detekt config
Copy code
exclude { it.file.absolutePath.contains("build") }
(because
exclude("**/build/**")
doesn't work in type resolution mode) and forgot to add surrounding
/
and our build server built everything in
/builds/projects/
🤦‍♂️