Hi folks. I wanted to work on this issue for IDEA plug-in to enable support of multiple baselines for multi-modular projects, but have some trouble understanding how to better implement this.
As far as I understand Detekt CLI, which is being invoked from the plug-in, supports only one baseline file.
My idea was to use
BaselineProvider
to load all baselines from multiple modules, collect all findings and manually suppressed issues into two single sets and create new baseline from them, encapsulating all issues from individual files into one. When I would have stored this file somewhere locally and use it to pass to Detekt CLI.
But now I see that there is an intention to add a new finding into baseline. In current scenario it should modify provided baseline file. But as we supposed to have multiple config files it’s a question, which config file to update.
Any idea about this?
g
gammax
10/16/2022, 11:29 AM
I feel this is underlying discussion for Detekt core.
gammax
10/16/2022, 11:29 AM
Like the IntelliJ plugin should not add extra logic to the Baseline processing and should just be a wrapper around the CLI apis.
o
oleg_osipenko
10/16/2022, 11:33 AM
Yeah, but current design of CLI have no idea about modules.
So, it’s a bit complicated
g
gammax
10/16/2022, 2:19 PM
We would need to extend the CLI to accept more than one baseline file