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 to 0.67.2 #35989

Merged
merged 1 commit into from Apr 16, 2019
Merged

Bump RuboCop to 0.67.2 #35989

merged 1 commit into from Apr 16, 2019

Conversation

koic
Copy link
Contributor

@koic koic commented Apr 16, 2019

Performance cops will be extracted from RuboCop to RuboCop Performance
when next RuboCop 0.68 will be released.
rubocop/rubocop#5977

RuboCop 0.67 is its transition period.

Since rails/rails repository uses Performance cops, This PR added
rubocop-performance gem to Gemfile.

And this PR fixes some offenses using the following auto-correct.

% bundle exec rubocop -a

Offenses:

activerecord/test/cases/connection_adapters/connection_handlers_multi_db_test.rb:212:26:
C: [Corrected] Layout/SpaceAroundOperators: Operator =
> should be surrounded by a single space.
              "primary"  => { adapter: "sqlite3", database: "db/primary.sqlite3" }
                         ^^
activerecord/test/cases/connection_adapters/connection_handlers_multi_db_test.rb:239:26:
C: [Corrected] Layout/SpaceAroundOperators: Operator => should be
surrounded by a single space.
              "primary"  => { adapter: "sqlite3", database: "db/primary.sqlite3" }
                         ^^
actionview/test/template/resolver_shared_tests.rb:1:1: C: [Corrected]
Style/FrozenStringLiteralComment: Missing magic comment #
frozen_string_literal: true.
module ResolverSharedTests
^
actionview/test/template/resolver_shared_tests.rb:10:33: C: [Corrected]
Layout/SpaceAroundEqualsInParameterDefault: Surrounding space missing in
default value assignment.
  def with_file(filename, source="File at #{filename}")
                                ^
actionview/test/template/resolver_shared_tests.rb:106:5: C: [Corrected]
Rails/RefuteMethods: Prefer assert_not_same over refute_same.
    refute_same a, b
    ^^^^^^^^^^^

2760 files inspected, 5 offenses detected, 5 offenses corrected

Summary

Other Information

Performance cops will be extracted from RuboCop to RuboCop Performance
when next RuboCop 0.68 will be released.
rubocop/rubocop#5977

RuboCop 0.67 is its transition period.

Since rails/rails repository uses Performance cops, This PR added
rubocop-performance gem to Gemfile.

And this PR fixes some offenses using the following auto-correct.

```console
% bundle exec rubocop -a

Offenses:

activerecord/test/cases/connection_adapters/connection_handlers_multi_db_test.rb:212:26:
C: [Corrected] Layout/SpaceAroundOperators: Operator =
> should be surrounded by a single space.
              "primary"  => { adapter: "sqlite3", database: "db/primary.sqlite3" }
                         ^^
activerecord/test/cases/connection_adapters/connection_handlers_multi_db_test.rb:239:26:
C: [Corrected] Layout/SpaceAroundOperators: Operator => should be
surrounded by a single space.
              "primary"  => { adapter: "sqlite3", database: "db/primary.sqlite3" }
                         ^^
actionview/test/template/resolver_shared_tests.rb:1:1: C: [Corrected]
Style/FrozenStringLiteralComment: Missing magic comment #
frozen_string_literal: true.
module ResolverSharedTests
^
actionview/test/template/resolver_shared_tests.rb:10:33: C: [Corrected]
Layout/SpaceAroundEqualsInParameterDefault: Surrounding space missing in
default value assignment.
  def with_file(filename, source="File at #{filename}")
                                ^
actionview/test/template/resolver_shared_tests.rb:106:5: C: [Corrected]
Rails/RefuteMethods: Prefer assert_not_same over refute_same.
    refute_same a, b
    ^^^^^^^^^^^

2760 files inspected, 5 offenses detected, 5 offenses corrected
```
@kamipo kamipo merged commit 96851dc into rails:master Apr 16, 2019
@kamipo
Copy link
Member

kamipo commented Apr 16, 2019

Thanks!

@koic koic deleted the bump_rubocop_to_0_67_2 branch April 16, 2019 09:15
koic added a commit to koic/rubocop-rails_config that referenced this pull request Apr 26, 2019
Follow up of rails/rails#35989.

RuboCop 0.67 has been released and used by rails/rails.
toshimaru pushed a commit to toshimaru/rubocop-rails_config that referenced this pull request Apr 26, 2019
Follow up of rails/rails#35989.

RuboCop 0.67 has been released and used by rails/rails.
natesholland added a commit to natesholland/rails that referenced this pull request May 4, 2019
Performance cops were extracted in rubocop/rubocop#5977 and @koic
updated to 0.67.2 and added the rubocop-performance gem in rails#35989.

This bumps rubocop to 0.68.1 to be on the latest version. Two changes
were made in regards to the bump of the version:
* The first was that Layout/FirstParameterIndentation was renamed to
Layout/IndentFirstArgument. These changes can be seen in
rubocop/rubocop#6982 and rubocop/rubocop#6987
* The second was that a new instance of the Style/HashSyntax cop was
found. I updated that instance to follow the new Ruby >= 1.9 syntax.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants