Is there a good way to temporarily run detekt with...
# detekt
Is there a good way to temporarily run detekt with the strictest possible ruleset? I’d like to be able to do housekeeping every once in a while, without adding too much restriction to the project most of the time.
Running with a baseline and removing the base line file might be a quick workaround
Just have a stricter rules file and swap that temporarily with the default one.
Stricter possible rules is tricky. There is a option to enable all the rules. But, usually, that's not what you want because there are some opinated or controversial rules on detekt.
Really? I treat detekt almost dogmatically 😂 Do you have an example of a rule that you feel might cause conflict in a team or that has had controversies before?
We cae about of the default configuration. In general there are not any controversial rule enabled by default. But we have rules that can be useful for some projects but not for others. Examples: •
(or any one in the documentation) •
why on earth a long function name is a bad thing?
In general I think that it’s good to take the full configuration of detekt and talk with the team which rules you agree on and which don’t. And keep the configuration as something like that goes evolving. If you think that a rule is “important” but you never have time to handle it there is no point to keep it enabled.
If detekt makes far too much noise the people start ignoring it.