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
Make it possible to enable/disable pending cops via a configuration option #7850
Comments
I think that the new feature will lead to a solution. I'm considering command line and configuration options. Command line optionsRun including pending cops. % rubocop --with-pending-cops Run excluding pending cops. % rubocop --without-pending-cops .rubocop.yml configurationIn addition, it is an example to specify in .rubocop.yml instead of the command line option. These configuration values have the same meaning as the AllCops:
EnabledNewCops: pending # default AllCops:
EnabledNewCops: true AllCops:
EnabledNewCops: false Maybe option and configuration names could be considered further. |
I'm fine with the proposal but let's use naming like
Yeah, that's more or less what I had in mind. I guess the option can be named "NewCops" and have potential values "enable", "disable", "pending". Generally, we can go only with the command-line option, as users can put it in their |
These naming sounds easy to understand 🌟I will take this issue! |
Resolves rubocop#7850. This PR will add `--enable-pending-cops` and `--disable-pending-cops` command-line options and `NewCops` will be provided in .rubocop.yml. When `NewCops` is `enable`, pending cops are enabled in bulk. ```yaml AllCops: NewCops: enable ``` Can be overridden by the `--enable-pending-cops` command-line option. When `NewCops` is `disable`, pending cops are disabled in bulk. ```yaml AllCops: NewCops: disable ``` Can be overridden by the `--disable-pending-cops` command-line option. The default value of `NewCops` is `pending`.
Resolves #7850. This PR will add `--enable-pending-cops` and `--disable-pending-cops` command-line options and `NewCops` will be provided in .rubocop.yml. When `NewCops` is `enable`, pending cops are enabled in bulk. ```yaml AllCops: NewCops: enable ``` Can be overridden by the `--enable-pending-cops` command-line option. When `NewCops` is `disable`, pending cops are disabled in bulk. ```yaml AllCops: NewCops: disable ``` Can be overridden by the `--disable-pending-cops` command-line option. The default value of `NewCops` is `pending`.
I think it's worth mention that final variant in rubocop 0.82.0
But
|
|
Thank you thank you thank you |
Is your feature request related to a problem? Please describe.
It seems some people are frustrated by the fact they have to manually enable/disable pending cops (see #7771). This also came up a few times in the RuboCop defaults survey.
Describe the solution you'd like
We should add configuration option allowing pending cops to be treated as pending (default), enabled or disabled by default. This would allow everyone to decide how to best handle those those.
Describe alternatives you've considered
I don't think there are any better alternatives.
@rubocop-hq/rubocop-core Any thoughts on this?
The text was updated successfully, but these errors were encountered: