Does anyone know if it's possible to set Detekt th...
# detekt
f
Does anyone know if it's possible to set Detekt threshold in gradle file and keep the configuration in .yml? Use case: I have three projects in one repo and I want to share the config, but the threshold for each project is independent.
g
I think you should be able to achieve this by merging different config files (and control which file to pick via Gradle).
b
Related with https://github.com/detekt/detekt/issues/2267 but not the same.
And I agree with @gammax, merging configs is the way to do it right now.
f
Thanks, folks!
Yes the issue is exactly what I need, but seems like so far I have to do file manipulations to achieve the similar result.
t
self-plug: There is this plug-in you can use that handles the thresholds for you. It's pretty easy to setup the thresholds per module. You can even have custom logic to evaluate if you want to fail the build or not. https://github.com/GradleUp/static-analysis-plugin/
👍 1