-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to disable all cops except some #1918
Comments
You use the
|
Thanks, but how to do it with config file? |
I'm not sure why you would want to do that exactly, but the normal workflow when starting to use RuboCop is to run |
I was wondering the same thing. I don't want to inherit all of the default style checks that Rubocop provides by default and would much rather just specify the things we want rather than have to keep going back in to override things. It would be great to be able to just |
Tried messing around in a fork a bit to see if we can just get rid of the default config, but it looks like we're expecting configuration values to be present for all the cops (as opposed to reading the configs and only loading cops that are declared) |
Opening this issue again to make a pull request with a solution. |
👍 |
Sweet thanks! |
[Fix #1918] Add config param AllCops:DisabledByDefault
This is a great feature, thanks! Is there any ETA on the upcoming release containing this? |
It would actually be nice to have the same option for each category. I'm interested in everything except all the |
@pschambacher This issue talks about a few different options, so can you clarify a bit what it is that you want? |
@jonas054 this is what I was thinking about: AllCops:
DisableByDefault: false
Style/AllCops:
DisableByDefault: true This way I get all existing (and future) cops enabled except for any existing (and future) Style cops. |
That's a good idea. But the syntax should be Style:
DisableByDefault: true Currently, such a setting is silently ignored, which is clearly not what we want. |
I'm completely fine with this syntax :) |
I came looking for Metrics:
DisableByDefault: true and found this ticket. is anyone working on it? |
Most likely no. |
For people get here later and interested in this, you can find doc at: What you want may look like this: AllCops:
DisabledByDefault: true
Style:
Enabled: true |
No description provided.
The text was updated successfully, but these errors were encountered: