Skip to content

Ignore a file or directory #4825

Answered by cortinico
interfect asked this question in Q&A
May 10, 2022 · 1 comments · 9 replies
Discussion options

You must be logged in to vote

It looks like in detekt.yml I can set an excludes for each rule; is there a way to set a global excludes? Or to put a @file:Suppress that will suppress all Detekt processing rather than just certain rules?

You can put an excludes at the ruleset level inside the config file. So you won't have to copy it over to every rule.

If you're using the CLI you can use the --excludes parameter to exclude certain paths.
If you're using the Gradle Plugin, similarly you can configure the source and excludes for the Detekt tasks

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@govindrai
Comment options

@cortinico
Comment options

@BraisGabin
Comment options

@cortinico
Comment options

@BraisGabin
Comment options

Answer selected by schalkms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants