What do you mean with "ignored"? Would you want not to autofix the issues inside the baseline? That "feature" is not implemented (and I'm not sure if we would want to implement it).
a
Arthur Krukowski
01/03/2024, 11:37 AM
Yes, I’d like to fix only new issues, without those that are inside the baseline file.
Arthur Krukowski
01/03/2024, 11:44 AM
Within our team, detekt is set up without enabling auto-correction, yet certain team members prefer utilizing scripts such as husky. This led me to thought whether incorporating
./gradlew detekt --auto-correct
as a pre-commit hook is feasible. However, if this approach does not consider the baseline file, it will not work for us.
b
Brais Gabin
01/03/2024, 11:52 AM
I imagine that you use
--auto-correct
for the
formatting
rule set. That's a wrapper around ktlint. And as far as I know
ktlint
has its own
baseline
. It's now possible to use it while using
detekt
but maybe you could think to split your formatting and your static analysis (code smells) in two. So you use ktlint (and any of their pluggins, I recommend spotless) for formatting and detekt for code smells.
a
Arthur Krukowski
01/03/2024, 11:55 AM
I imagine that you use
--auto-correct
for the
formatting
rule set.
Yeah, this our case)
Thanks for suggestion, I’ll consider it.