Someone is sharing a detekt configuration via depe...
# detekt
j
Someone is sharing a detekt configuration via dependencies on multiple projects instead of copy/paste the yaml file?
y
you need YAMl file at my project
j
can it be empty at least?
and get the configurations from the dependency
y
detekt-config not empty
s
I have written a Gradle plugin that does this, but it's hacky... The Gradle plugin contained a
yml
file in its resources, and copied it to the downstream project 😕
IMO Detekt should have a Gradle DSL for configuration, that can easily be configured in a shared
buildSrc
.
j
I was thinking about the @Brais Gabin feature but I haven't tried it
so I can just
Copy code
dependencies {
    detekt(…)
}
where … can be any shared rule or group of rules
b
What's my feature? I think that I'm missing something
j
b
Oh! I see. No, I don't think you can use that. What that's does is to append some configuration to the base configuration of detekt. I'm not sure what would happen if a yaml has to
style:
keys at the same level.
d
We download the yaml from our Core project on GitHub
b
With a gradle task?
d
Yes