obviously this is an edgecase on the intended use of the rule, but it's fairly common with kotest. For now, I'm thinking the best solution is to disable the rule only for
src/test/kotlin/**/*.kt
d
David Meyer
07/09/2024, 10:39 PM
I don't think there is currently an option, but I'm interested in making it more configurable. You could reply to this discussion: https://github.com/pinterest/ktlint/discussions/2711
If this is a breaking change in
1.3.0
, it might be worth opening an issue. But in the short term, I think what you suggested about disabling the rule for test source sets makes sense as a work-around.