When providing a configuration file to Rubocop 0.80.0, I see three warnings related to
Does not happen with RuboCop 0.79.0
I'm testing the current master branch
Do not see warnings
$ rubocop -V
0.80.0 (using Parser 2.7.0.2, running on ruby 2.7.0 x86_64-darwin19)
$ rubocop
The following cops were added to RuboCop, but are not configured. Please set Enabled to either `true` or `false` in your `.rubocop.yml` file:
- Style/HashEachMethods
- Style/HashTransformKeys
- Style/HashTransformValues
$ touch test.rb
$ touch .rubocop.yml
$ rubocop
0.80.0 (using Parser 2.7.0.2, running on ruby 2.7.0 x86_64-darwin19)
Include the output of rubocop -V or bundle exec rubocop -V if using Bundler. Here's an example:
$ [bundle exec] rubocop -V
0.80.0 (using Parser 2.7.0.2, running on ruby 2.7.0 x86_64-darwin19)
Also this broke overcommit integration
That's a feature. :-) As many users were complaining that when new cops were introduced this caused CI failures and extra code fixing work, we decided to just list the new cops that were added and leave it to the users to enable/disable them.
Note that those are not warnings - just informative messages.
See https://github.com/rubocop-hq/rubocop/pull/7567 and https://github.com/rubocop-hq/rubocop/issues/5979 for more details.
But I don't think broken overcommit integration is look like a feature, or is this better to discuss with overcommit team?
But I don't think broken overcommit integration is look like a feature
I was referring to the description of the issue.
or is this better to discuss with overcommit team?
I think that'd be best. I'm sorry to hear the change caused a breakage, but I've never used the tool, so I'm not sure what this integration looks like. We're always willing to help 3rd party tools that want to leverage RuboCop.
@bbatsov Ok, thanks. Created an issue at overcommit - https://github.com/sds/overcommit/issues/704
That's a feature. :-) As many users were complaining that when new cops were introduced this caused CI failures and extra code fixing work, we decided to just list the new cops that were added and leave it to the users to enable/disable them.
Hi @bbatsov , thanks for the clarification!
So every new cop will have "Enabled: pending" and we should decide if we want them or not in our own rubocop.yml?
Yes. RuboCop will update the pending status to enabled/disable only for major releases (similar to what ESLint does).
We'll likely cut RuboCop 1.0 is the next couple of months.
@bbatsov is there any command line options to enable by default the newly introduced cops?
Use case:
rubocop -a.rubocop.yml file
Most helpful comment
That's a feature. :-) As many users were complaining that when new cops were introduced this caused CI failures and extra code fixing work, we decided to just list the new cops that were added and leave it to the users to enable/disable them.
Note that those are not warnings - just informative messages.