Skip to content

Commit

Permalink
Bump RuboCop to 0.58.2
Browse files Browse the repository at this point in the history
## Summary

RuboCop 0.58.2 was released.
https://github.com/rubocop-hq/rubocop/releases/tag/v0.58.2

And rubocop-0-58 channel is available in Code Climate.
https://github.com/codeclimate/codeclimate/releases/tag/v0.76.0
qltysh/qlty@38f21f0

In addition, the following changes are made in this PR.

- Replace Custom cops with Rails cops
- Add jaro_winkler gem to Gemfile.lock

### Replace Custom cops with Rails cops

These are compatible replacements.

- Replace `CustomCops/AssertNot` cop with `Rails/AssertNot` cop.
- Replace `CustomCops/RefuteNot` cop with `Rails/RefuteMethods` cop.

With this replacement, it was decided to use cop of RuboCop itself.
It removes the code related to CustomCops accordingly.

### Add jaro_winkler gem to Gemfile.lock

Since RuboCop 0.57.0 depends on jaro_winkler gem,
it has been added to Gemfile.lock.
  • Loading branch information
koic committed Jul 26, 2018
1 parent 91fd679 commit 211b10a
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 287 deletions.
2 changes: 1 addition & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ checks:
engines:
rubocop:
enabled: true
channel: rubocop-0-54
channel: rubocop-0-58

ratings:
paths:
Expand Down
13 changes: 7 additions & 6 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require: './ci/custom_cops/lib/custom_cops'

AllCops:
TargetRubyVersion: 2.4
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
Expand All @@ -11,13 +9,16 @@ AllCops:
- 'actionpack/lib/action_dispatch/journey/parser.rb'
- 'railties/test/fixtures/tmp/**/*'

# Prefer assert_not_x over refute_x
CustomCops/RefuteNot:
Rails:
Enabled: true

# Prefer assert_not over assert !
Rails/AssertNot:
Include:
- '**/test/**/*'

# Prefer assert_not over assert !
CustomCops/AssertNot:
# Prefer assert_not_x over refute_x
Rails/RefuteMethods:
Include:
- '**/test/**/*'

Expand Down
13 changes: 8 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ GEM
mini_magick (~> 4.0)
ruby-vips (>= 2.0.10, < 3)
io-like (0.3.0)
jaro_winkler (1.5.1)
jaro_winkler (1.5.1-java)
jdbc-mysql (5.1.46)
jdbc-postgres (42.1.4)
jdbc-sqlite3 (3.20.1)
Expand Down Expand Up @@ -347,13 +349,13 @@ GEM
mini_portile2 (~> 2.3.0)
os (0.9.6)
parallel (1.12.1)
parser (2.5.1.0)
parser (2.5.1.2)
ast (~> 2.4.0)
path_expander (1.0.3)
pg (1.0.0)
pg (1.0.0-x64-mingw32)
pg (1.0.0-x86-mingw32)
powerpack (0.1.1)
powerpack (0.1.2)
psych (3.0.2)
public_suffix (3.0.2)
puma (3.11.4)
Expand Down Expand Up @@ -400,9 +402,10 @@ GEM
resque (~> 1.26)
rufus-scheduler (~> 3.2)
retriable (3.1.1)
rubocop (0.56.0)
rubocop (0.58.2)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5)
parser (>= 2.5, != 2.5.1.1)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
Expand Down Expand Up @@ -485,7 +488,7 @@ GEM
uber (0.1.0)
uglifier (4.1.10)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.3.3)
unicode-display_width (1.4.0)
useragent (0.16.10)
vegas (0.1.11)
rack (>= 1.0.0)
Expand Down
5 changes: 0 additions & 5 deletions ci/custom_cops/bin/test

This file was deleted.

4 changes: 0 additions & 4 deletions ci/custom_cops/lib/custom_cops.rb

This file was deleted.

40 changes: 0 additions & 40 deletions ci/custom_cops/lib/custom_cops/assert_not.rb

This file was deleted.

71 changes: 0 additions & 71 deletions ci/custom_cops/lib/custom_cops/refute_not.rb

This file was deleted.

42 changes: 0 additions & 42 deletions ci/custom_cops/test/custom_cops/assert_not_test.rb

This file was deleted.

66 changes: 0 additions & 66 deletions ci/custom_cops/test/custom_cops/refute_not_test.rb

This file was deleted.

47 changes: 0 additions & 47 deletions ci/custom_cops/test/support/cop_helper.rb

This file was deleted.

0 comments on commit 211b10a

Please sign in to comment.