Skip to content

Commit

Permalink
Merge pull request #36426 from abhaynikam/bump-codeclimate-rubocop-ve…
Browse files Browse the repository at this point in the history
…rsion

Bump rubocop to 0.71
  • Loading branch information
kamipo committed Jun 6, 2019
2 parents 4972567 + 00b3b68 commit 6481446
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ checks:
plugins:
rubocop:
enabled: true
channel: rubocop-0-67
channel: rubocop-0-71

exclude_patterns: []
13 changes: 6 additions & 7 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
require: rubocop-performance
require:
- rubocop-performance
- rubocop-rails

AllCops:
TargetRubyVersion: 2.5
Expand All @@ -18,9 +20,6 @@ Performance:
Exclude:
- '**/test/**/*'

Rails:
Enabled: true

# Prefer assert_not over assert !
Rails/AssertNot:
Include:
Expand Down Expand Up @@ -77,13 +76,13 @@ Layout/EmptyLinesAroundMethodBody:
Layout/EmptyLinesAroundModuleBody:
Enabled: true

Layout/FirstParameterIndentation:
Enabled: true

# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
Style/HashSyntax:
Enabled: true

Layout/IndentFirstArgument:
Enabled: true

# Method definitions after `private` or `protected` isolated calls need one
# extra level of indentation.
Layout/IndentationConsistency:
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ gem "json", ">= 2.0.0"

gem "rubocop", ">= 0.47", require: false
gem "rubocop-performance", require: false
gem "rubocop-rails", require: false

group :doc do
gem "sdoc", "~> 1.0"
Expand Down
24 changes: 11 additions & 13 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ GEM
image_processing (1.7.1)
mini_magick (~> 4.0)
ruby-vips (>= 2.0.13, < 3)
jar-dependencies (0.4.0)
jaro_winkler (1.5.2)
jaro_winkler (1.5.2-java)
jdbc-mysql (5.1.46)
Expand Down Expand Up @@ -349,18 +348,14 @@ GEM
nokogiri (1.9.1-x86-mingw32)
mini_portile2 (~> 2.4.0)
os (1.0.0)
parallel (1.13.0)
parser (2.6.2.0)
parallel (1.17.0)
parser (2.6.3.0)
ast (~> 2.4.0)
path_expander (1.0.3)
pg (1.1.3)
pg (1.1.3-x64-mingw32)
pg (1.1.3-x86-mingw32)
psych (3.1.0)
psych (3.1.0-java)
jar-dependencies (>= 0.1.7)
psych (3.1.0-x64-mingw32)
psych (3.1.0-x86-mingw32)
public_suffix (3.0.3)
puma (3.12.1)
puma (3.12.1-java)
Expand Down Expand Up @@ -411,17 +406,19 @@ GEM
resque (>= 1.26)
rufus-scheduler (~> 3.2)
retriable (3.1.2)
rubocop (0.67.2)
rubocop (0.71.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
psych (>= 3.1.0)
parser (>= 2.6)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.6)
unicode-display_width (>= 1.4.0, < 1.7)
rubocop-performance (1.1.0)
rubocop (>= 0.67.0)
ruby-progressbar (1.10.0)
rubocop-rails (2.0.0)
rack (>= 2.0)
rubocop (>= 0.70.0)
ruby-progressbar (1.10.1)
ruby-vips (2.0.13)
ffi (~> 1.9)
ruby_dep (1.5.0)
Expand Down Expand Up @@ -499,7 +496,7 @@ GEM
uber (0.1.0)
uglifier (4.1.19)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.5.0)
unicode-display_width (1.6.0)
useragent (0.16.10)
vegas (0.1.11)
rack (>= 1.0.0)
Expand Down Expand Up @@ -584,6 +581,7 @@ DEPENDENCIES
resque-scheduler
rubocop (>= 0.47)
rubocop-performance
rubocop-rails
sass-rails
sdoc (~> 1.0)
selenium-webdriver (>= 3.5.0)
Expand Down
2 changes: 0 additions & 2 deletions actionpack/test/controller/resources_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def test_override_paths_for_member_and_collection_methods
collection: collection_methods,
member: member_methods,
path_names: path_names do

assert_restful_routes_for :messages,
collection: collection_methods,
member: member_methods,
Expand All @@ -58,7 +57,6 @@ def test_override_paths_for_member_and_collection_methods
collection: collection_methods,
member: member_methods,
path_names: path_names do |options|

collection_methods.each_key do |action|
assert_named_route "/messages/#{path_names[action] || action}", "#{action}_messages_path", action: action
end
Expand Down
1 change: 0 additions & 1 deletion actionpack/test/dispatch/request_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,6 @@ class RequestProtocol < BaseRequestTest
class RequestMethod < BaseRequestTest
test "method returns environment's request method when it has not been
overridden by middleware".squish do

ActionDispatch::Request::HTTP_METHODS.each do |method|
request = stub_request("REQUEST_METHOD" => method)

Expand Down
2 changes: 1 addition & 1 deletion actionview/test/actionpack/abstract/layouts_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ class TestBase < ActiveSupport::TestCase
10.times do |x|
controller = WithString.new
controller.define_singleton_method :index do
render template: ActionView::Template::Text.new("Hello string!"), locals: { :"x#{x}" => :omg }
render template: ActionView::Template::Text.new("Hello string!"), locals: { "x#{x}": :omg }
end
controller.process(:index)
end
Expand Down
2 changes: 0 additions & 2 deletions activerecord/test/cases/associations/eager_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,6 @@ def test_eager_with_has_many_and_limit_and_scoped_conditions_on_the_eagers
.where("comments.body like 'Normal%' OR comments.#{QUOTED_TYPE}= 'SpecialComment'")
.references(:comments)
.scoping do

posts = authors(:david).posts.limit(2).to_a
assert_equal 2, posts.size
end
Expand All @@ -798,7 +797,6 @@ def test_eager_with_has_many_and_limit_and_scoped_conditions_on_the_eagers
.where("authors.name = 'David' AND (comments.body like 'Normal%' OR comments.#{QUOTED_TYPE}= 'SpecialComment')")
.references(:authors, :comments)
.scoping do

count = Post.limit(2).count
assert_equal count, posts.size
end
Expand Down

0 comments on commit 6481446

Please sign in to comment.