Peter
04/17/2024, 9:56 AMdetektMain
gradle task, or is it also required to run detekt
?marschwar
04/17/2024, 10:53 AMdetektMain
will only check the production code, not the tests. If all you want to check, then that is sufficient. The rules that are being checked by detekt
are a subset of those run by detektMain
, so it is not necessary to run both when configured for the same source files.Brais Gabin
04/17/2024, 11:56 AMJonas
04/17/2024, 11:58 AMtasks.register("detektDebugAll") {
dependsOn("detektDebug", "detektDebugUnitTest", "detektDebugAndroidTest")
}
Also use this one in a pre-push hook then.Brais Gabin
04/17/2024, 1:10 PMPeter
04/17/2024, 3:59 PMCRamsan
04/25/2024, 2:31 PMdetekt
was a super-set of detektMain
. But in practice this is not what I am seeing and instead what I see is what @marschwar mentions(detektMain
is a superset of detek
).
But this seems like a bug to me, Even the page described them as:
detektMain
- Similar to detekt
, but runs only on the main
source set.
I will file a bug and see what the detekt team says.CRamsan
04/25/2024, 2:33 PMdetekt
and detektMain
is described here.