Skip to content

Commit d7fce6c

Browse files
committed
Fix odd closing parenthesis by enabling the Layout/ClosingParenthesisIndentation cop
1 parent f58f8e1 commit d7fce6c

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

.rubocop.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ Layout/CaseIndentation:
4949
Layout/ClosingHeredocIndentation:
5050
Enabled: true
5151

52+
Layout/ClosingParenthesisIndentation:
53+
Enabled: true
54+
5255
# Align comments with method definitions.
5356
Layout/CommentIndentation:
5457
Enabled: true

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ GEM
395395
retriable (3.1.2)
396396
rexml (3.2.5)
397397
rouge (3.26.0)
398-
rubocop (1.17.0)
398+
rubocop (1.18.1)
399399
parallel (~> 1.10)
400400
parser (>= 3.0.0.0)
401401
rainbow (>= 2.2.2, < 4.0)
@@ -411,7 +411,7 @@ GEM
411411
rubocop-performance (1.11.3)
412412
rubocop (>= 1.7.0, < 2.0)
413413
rubocop-ast (>= 0.4.0)
414-
rubocop-rails (2.10.1)
414+
rubocop-rails (2.11.2)
415415
activesupport (>= 4.2.0)
416416
rack (>= 1.1)
417417
rubocop (>= 1.7.0, < 2.0)

actionview/test/template/form_helper_test.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ def test_radio_button
836836
def test_radio_button_is_checked_with_integers
837837
assert_dom_equal('<input checked="checked" id="post_secret_1" name="post[secret]" type="radio" value="1" />',
838838
radio_button("post", "secret", "1")
839-
)
839+
)
840840
end
841841

842842
def test_radio_button_with_negative_integer_value
@@ -847,7 +847,7 @@ def test_radio_button_with_negative_integer_value
847847
def test_radio_button_respects_passed_in_id
848848
assert_dom_equal('<input checked="checked" id="foo" name="post[secret]" type="radio" value="1" />',
849849
radio_button("post", "secret", "1", id: "foo")
850-
)
850+
)
851851
end
852852

853853
def test_radio_button_with_booleans
@@ -1486,7 +1486,7 @@ def test_auto_index
14861486
assert_dom_equal(
14871487
%{<input checked="checked" id="post_#{pid}_title_hello_world" name="post[#{pid}][title]" type="radio" value="Hello World" />},
14881488
radio_button("post[]", "title", "Hello World")
1489-
)
1489+
)
14901490
assert_dom_equal(
14911491
%{<input id="post_#{pid}_title_goodbye_world" name="post[#{pid}][title]" type="radio" value="Goodbye World" />},
14921492
radio_button("post[]", "title", "Goodbye World")
@@ -1510,7 +1510,7 @@ def test_auto_index_with_nil_id
15101510
assert_dom_equal(
15111511
%{<input checked="checked" name="post[#{pid}][title]" type="radio" value="Hello World" />},
15121512
radio_button("post[]", "title", "Hello World", id: nil)
1513-
)
1513+
)
15141514
assert_dom_equal(
15151515
%{<input name="post[#{pid}][title]" type="radio" value="Goodbye World" />},
15161516
radio_button("post[]", "title", "Goodbye World", id: nil)

activerecord/lib/active_record/relation/finder_methods.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ def apply_join_dependency(eager_loading: group_values.empty?)
435435
), nil
436436
).reflections
437437
)
438-
)
438+
)
439439
relation = skip_query_cache_if_necessary do
440440
klass.connection.distinct_relation_for_primary_key(relation)
441441
end

activerecord/test/cases/relations_test.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,8 @@ def test_find_on_hash_conditions
533533
end
534534

535535
def test_joins_with_string_array
536-
person_with_reader_and_post = Post.joins([
536+
person_with_reader_and_post = Post.joins(
537+
[
537538
"INNER JOIN categorizations ON categorizations.post_id = posts.id",
538539
"INNER JOIN categories ON categories.id = categorizations.category_id AND categories.type = 'SpecialCategory'"
539540
]

0 commit comments

Comments
 (0)