Skip to content
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

Bump RuboCop version to 0.71 #1887

Merged
merged 1 commit into from
Jun 7, 2019
Merged

Bump RuboCop version to 0.71 #1887

merged 1 commit into from
Jun 7, 2019

Conversation

yahonda
Copy link
Collaborator

@yahonda yahonda commented Jun 5, 2019

This pull request bump sRuboCop version to 0.71

https://github.com/rubocop-hq/rubocop/releases/tag/v0.71.0

Additional changes made:

  • Install rubocop-rails gem because Rails cops will be removed from RuboCop 0.72

  • Rename Layout/FirstParameterIndentation to Layout/IndentFirstArgument to support RuboCop 0.68.0

$ bundle exec rubocop
Error: The `Layout/FirstParameterIndentation` cop has been renamed to `Layout/IndentFirstArgument`.
(obsolete configuration found in .rubocop.yml, please update it)
$

@yahonda yahonda force-pushed the rubocop_071 branch 2 times, most recently from f98320f to e1b83c8 Compare June 5, 2019 23:34
@yahonda yahonda requested a review from koic June 5, 2019 23:38
@yahonda
Copy link
Collaborator Author

yahonda commented Jun 5, 2019

@koic I'm requesting your review because it gets these warnings. These warnings can be addressed by removing require: rubocop-rails from .rubocop.yml.

$ bundle exec rubocop
... snip ...
.rubocop.yml:1: `require` is concealed by line 2
Warning: unrecognized cop Performance/FlatMap found in .rubocop.yml
Warning: unrecognized cop Performance/RedundantMerge found in .rubocop.yml
Warning: unrecognized cop Performance/StartWith found in .rubocop.yml
Warning: unrecognized cop Performance/EndWith found in .rubocop.yml
Warning: unrecognized cop Performance/RegexpMatch found in .rubocop.yml
Warning: unrecognized cop Performance/ReverseEach found in .rubocop.yml
Warning: unrecognized cop Performance/UnfreezeString found in .rubocop.yml
Inspecting 66 files
..................................................................

66 files inspected, no offenses detected
$

Maybe I am misunderstanding this message bundle install. like RuboCop 0.71 still bundles Rails cops we will need to take this action suggested with RuboCop 0.72, not with 0.71.

Rails cops will be removed from RuboCop 0.72. Use the rubocop-rails gem instead.

Put this in your Gemfile.

gem 'rubocop-rails'

And then execute:

$ bundle install

Put this into your .rubocop.yml.

require: rubocop-rails

More information: https://github.com/rubocop-hq/rubocop-rails

@yahonda
Copy link
Collaborator Author

yahonda commented Jun 5, 2019

@koic Nevermind for my previous question, already answered by this pull request.
https://github.com/rubocop-hq/rubocop-rails/pull/66/files

.rubocop.yml Outdated
@@ -54,7 +56,7 @@ Layout/EmptyLinesAroundMethodBody:
Layout/EmptyLinesAroundModuleBody:
Enabled: true

Layout/FirstParameterIndentation:
Layout/IndentFirstArgument:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is preferable to move in ASCII order.
Ref: https://github.com/rails/rails/pull/36426/files#r291066852

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

https://github.com/rubocop-hq/rubocop/releases/tag/v0.71.0

Additional changes made:

* Install `rubocop-rails` gem because Rails cops will be removed from RuboCop 0.72

* Rename `Layout/FirstParameterIndentation` to `Layout/IndentFirstArgument` to support RuboCop 0.68.0

```ruby
$ bundle exec rubocop
Error: The `Layout/FirstParameterIndentation` cop has been renamed to `Layout/IndentFirstArgument`.
(obsolete configuration found in .rubocop.yml, please update it)
$
```

* Use `rubocop-0-71` channel at Code Climate

Refer https://github.com/codeclimate/codeclimate/releases/tag/v0.85.3
@koic
Copy link
Collaborator

koic commented Jun 7, 2019

rails/rails#36426 has been merged. Thanks!

@koic koic merged commit 01828da into rsim:master Jun 7, 2019
@yahonda yahonda deleted the rubocop_071 branch July 13, 2020 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants