Just saw question about "running detekt on a singl...
# detekt
g
Just saw question about "running detekt on a single file" on my notifications. I came here to answer, but the message is gone šŸ˜… Anyway, you can use the
--input
arg. More on this here https://detekt.dev/docs/gettingstarted/git-pre-commit-hook
b
does this also work for the gradle plugin? Any plans on adding it?
g
Yes it works for the Gradle Plugin as well. Though you have to create your own task probably
šŸ‘ 1
b
Thanks for the response! May i ask how can i run the gradle detekt plugin with certain input files? I’ve tried
./gradlew detekt --input my_file.kt
but i get
Unknown command-line option ā€˜--input’.
Though you have to create your own task probably
is there an example??
g
b
thank you!! šŸ™Œ
g
You can't just
./gradlew detekt --input my_file.kt
though. You'll have to use a property or so.
If you run detekt on a single file, use the CLI
353 Views