Hi everybody! What’s the way to overwrite the dete...
# detekt
m
Hi everybody! What’s the way to overwrite the detekt autocorrect flag (defined in
detekt
block in the gradle file) with a command line gradle task parameter? I checked the docs but I didn’t find how. I’ve also tried
./gradlew detekt -Pauto-correct=true
and
./gradlew detekt -PautoCorrect=true
along with some other similar commands but none of them worked.
b
I think that this it’s not supported. Could you create an issue exaplaining your use case in the repo? I think that we should support it
g
☝️ That’s not supported out of the box as we don’t annotate with
@Option
our gradle tasks. What you can do is create your own property called
autoCorrect
and then invoke your command with
-PautoCorrect=…
. But that’s part of the Gradle Property API and is unrelated to detekt
m
Thanks for the answer @Brais Gabin @gammax FYI https://github.com/detekt/detekt/issues/2880
👌 1