-
-
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
Opting-out of cops at the command line #1430
Comments
By "all the cops" you mean all cops that are enabled in the config, right? |
Right, all enabled cops (they're all enabled by default, right?). |
If you want to run all (enabled) cops except a specified list, then the lint cops will be included. You don't need
# except.yml
inherit_from: .rubocop.yml
Style/Tab:
Enabled: false
Style/ConstantName:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false |
@jonas054 I don't think my issue title was specific enough; I agree that you can do this via a configuration file. But it's much easier to specify these at the command line for things like, e.g., special Rake tasks and CI runs -- that's nice because you're documenting the arguments in the same spot as where you're invoking Rubocop. When you use a configuration file, you have to check two places instead of one. |
If someone wants to add an |
[Fix #1430] Add option --except for disabling cops on command line
Thanks @jonas054! 👍 ✖️ 💯 |
I'd like a way to say:
IOW, I was looking for something like, e.g.:
Right now the workaround I've been using is to use
--only
with a very long list in a Rake task, but that's not very maintainable.You can also do this via a configuration file. But it's much easier to specify these at the command line for things like, e.g., special Rake tasks and CI runs -- that's nice because you're documenting the arguments in the same spot as where you're invoking Rubocop. When you use a configuration file, you have to check two places instead of one.
The text was updated successfully, but these errors were encountered: