https://kotlinlang.org logo
#detekt
Title
# detekt
i

Ihar S

03/30/2021, 11:12 AM
Hello Detekt Magicians, Small question, does detekt supports remote config files? We have dozens of kotlin repos and the centralized configuration file can improve some processes in the company Googling hasn't answered my question
g

gammax

03/30/2021, 2:36 PM
Not out of the box. You would have to write your own task that downloads a Config file and make sure such task runs before all the Detekt tasks. As an alternative you could use git submodules or similar methods to share code/files.
j

Joe

03/30/2021, 4:53 PM
We have our detekt config file jar'ed up in a "build-resources" jar, which we then add to the detekt classpath and reference via
--config-resource
. maven/antrun config here, I'm sure there's a gradle equivalent: https://github.com/trib3/leakycauldron/blob/main/parent-pom/pom.xml#L1469-L1518
2 Views