-
Hi, I hope I didn't miss anything in the docs or the Q&As. I would like to run detekt with different sets of rules. For example: For pre-commit hooks I am e.g. only interested in Is there any way to achieve that? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You can define the common rule configuration in one file and the environment-specific configuration in multiple others.
Does this help? |
Beta Was this translation helpful? Give feedback.
-
Adding a small side note: you can also use the |
Beta Was this translation helpful? Give feedback.
You can define the common rule configuration in one file and the environment-specific configuration in multiple others.
Detekt allows to pass multiple config files as seen here. The suggestion would be to select the passed configuration files depending on the current environment.
Does this help?