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

sanogueralorenzo

08/17/2019, 12:43 AM
what am I missing? how can I have a centralized baseline for the project?
a

Artur Bosch

08/17/2019, 7:43 PM
Unfortunately we haven't figured out how to have a centralized baseline file across different gradle modules. Something that works for Gradle but is also as generic to be included into detekt-api would be great.
An idea which just came up: we could have a modularized baseline which have different sections for each gradle module like
detekt-cli
and just override
detekt-cli
when run ...
The generic part is tricky... we could add a
--baseline [prefix:]path
option which the gradle plugin could use to let detekt know which baseline part to override...
👍 1
s

sanogueralorenzo

09/14/2019, 10:37 PM
The last idea would be amazing, would allow having the above without the overhead of every module
Current solution to the above is to not have any baselines 😄 unfortunately the project I'm working in is big and has over 500 issues in the baselines Maybe we can relax the most common issues and manually fix the remaining ones? What do you suggest?
a

Artur Bosch

09/16/2019, 8:12 AM
What about having a top level custom detekt task which runs in CI and has the baseline. module based detekt tasks could be used for quick single module feedback without the baseline and without breaking the build showing all errors. See our gradle file on how we setup'ed
detektAll
task 🙂
2 Views