diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-07-27 09:05:41 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-27 09:05:41 +0900 |
commit | b4d91bb41f9cc555d80d0cb6b0a41179d26fa252 (patch) | |
tree | db235b3475096508d6400010b08ada428968ce2d | |
parent | e03add224899e0a10e7cfa28c09e68c8b9c920ed (diff) | |
parent | 1933fbaecf5efa982c4214fed51d88d120ffe236 (diff) | |
download | rails-b4d91bb41f9cc555d80d0cb6b0a41179d26fa252.tar.gz rails-b4d91bb41f9cc555d80d0cb6b0a41179d26fa252.tar.bz2 rails-b4d91bb41f9cc555d80d0cb6b0a41179d26fa252.zip |
Merge pull request #33441 from bogdanvlviv/remove-rubocop-comments-from-codebase
Remove Rubocop's comments from Rails code base
-rw-r--r-- | .rubocop.yml | 4 | ||||
-rw-r--r-- | actionpack/test/dispatch/header_test.rb | 4 | ||||
-rw-r--r-- | activerecord/test/cases/relation_test.rb | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/subscriber.rb | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/.rubocop.yml b/.rubocop.yml index 9db88cbbdf..e93e7ff82f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -9,6 +9,10 @@ AllCops: - 'actionpack/lib/action_dispatch/journey/parser.rb' - 'railties/test/fixtures/tmp/**/*' +Performance: + Exclude: + - '**/test/**/*' + Rails: Enabled: true diff --git a/actionpack/test/dispatch/header_test.rb b/actionpack/test/dispatch/header_test.rb index 43e63eb996..bd2a5b35fb 100644 --- a/actionpack/test/dispatch/header_test.rb +++ b/actionpack/test/dispatch/header_test.rb @@ -105,20 +105,16 @@ class HeaderTest < ActiveSupport::TestCase end test "#merge! headers with mutation" do - # rubocop:disable Performance/RedundantMerge @headers.merge!("Host" => "http://example.test", "Content-Type" => "text/html") - # rubocop:enable Performance/RedundantMerge assert_equal({ "HTTP_HOST" => "http://example.test", "CONTENT_TYPE" => "text/html", "HTTP_REFERER" => "/some/page" }, @headers.env) end test "#merge! env with mutation" do - # rubocop:disable Performance/RedundantMerge @headers.merge!("HTTP_HOST" => "http://first.com", "CONTENT_TYPE" => "text/html") - # rubocop:enable Performance/RedundantMerge assert_equal({ "HTTP_HOST" => "http://first.com", "CONTENT_TYPE" => "text/html", "HTTP_REFERER" => "/some/page" }, @headers.env) diff --git a/activerecord/test/cases/relation_test.rb b/activerecord/test/cases/relation_test.rb index 3ca15640fd..fbeb617b29 100644 --- a/activerecord/test/cases/relation_test.rb +++ b/activerecord/test/cases/relation_test.rb @@ -187,7 +187,7 @@ module ActiveRecord end relation = Relation.new(klass) - relation.merge!(where: ["foo = ?", "bar"]) # rubocop:disable Performance/RedundantMerge + relation.merge!(where: ["foo = ?", "bar"]) assert_equal Relation::WhereClause.new(["foo = bar"]), relation.where_clause end diff --git a/activesupport/lib/active_support/subscriber.rb b/activesupport/lib/active_support/subscriber.rb index 54c770ac35..5a4c3d74af 100644 --- a/activesupport/lib/active_support/subscriber.rb +++ b/activesupport/lib/active_support/subscriber.rb @@ -88,7 +88,7 @@ module ActiveSupport end def finish(name, id, payload) - event = event_stack.pop + event = event_stack.pop event.finish! event.payload.merge!(payload) |