From f907b418aecfb6dab4e30149b88a8593ddd321b9 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sat, 8 Dec 2018 08:11:38 +0900 Subject: Enable `Layout/SpaceAfterSemicolon` cop to avoid newly adding odd spacing Ref https://github.com/rails/rails/commit/59ff1ba30d9f4d34b4d478104cc3f453e553c67a#diff-38fb97fba84b1ef0f311c4110a597c44R35 --- .rubocop.yml | 7 +++++-- .../test/cases/associations/has_many_through_associations_test.rb | 6 +++--- activesupport/test/deprecation_test.rb | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 033f7adf49..6eca479d9d 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -99,6 +99,9 @@ Layout/SpaceAfterColon: Layout/SpaceAfterComma: Enabled: true +Layout/SpaceAfterSemicolon: + Enabled: true + Layout/SpaceAroundEqualsInParameterDefault: Enabled: true @@ -109,10 +112,10 @@ Layout/SpaceAroundOperators: Enabled: true Layout/SpaceBeforeComma: - Enabled: true + Enabled: true Layout/SpaceBeforeFirstArg: - Enabled: true + Enabled: true Style/DefWithParentheses: Enabled: true diff --git a/activerecord/test/cases/associations/has_many_through_associations_test.rb b/activerecord/test/cases/associations/has_many_through_associations_test.rb index 77c3ed954a..bd535357ee 100644 --- a/activerecord/test/cases/associations/has_many_through_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb @@ -374,7 +374,7 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase end def test_delete_association - assert_queries(2) { posts(:welcome);people(:michael); } + assert_queries(2) { posts(:welcome); people(:michael); } assert_queries(1) do posts(:welcome).people.delete(people(:michael)) @@ -601,7 +601,7 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase end def test_replace_association - assert_queries(4) { posts(:welcome);people(:david);people(:michael); posts(:welcome).people.reload } + assert_queries(4) { posts(:welcome); people(:david); people(:michael); posts(:welcome).people.reload } # 1 query to delete the existing reader (michael) # 1 query to associate the new reader (david) @@ -740,7 +740,7 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase end def test_clear_associations - assert_queries(2) { posts(:welcome);posts(:welcome).people.reload } + assert_queries(2) { posts(:welcome); posts(:welcome).people.reload } assert_queries(1) do posts(:welcome).people.clear diff --git a/activesupport/test/deprecation_test.rb b/activesupport/test/deprecation_test.rb index 95e7174391..f25c704586 100644 --- a/activesupport/test/deprecation_test.rb +++ b/activesupport/test/deprecation_test.rb @@ -32,7 +32,7 @@ class Deprecatee deprecate :f= deprecate :g - def g ;end + def g; end module B C = 1 -- cgit v1.2.3