Skip to content

Commit fb98d2e

Browse files
authored
Merge pull request rails#26077 from kamipo/add_stype_empty_lines
Add `Style/EmptyLines` in `.rubocop.yml` and remove extra empty lines
2 parents 0d12708 + 762e3f0 commit fb98d2e

File tree

76 files changed

+4
-90
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+4
-90
lines changed

.rubocop.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ Style/BracesAroundHashParameters:
2020
Style/CaseIndentation:
2121
Enabled: true
2222

23+
# No extra empty lines.
24+
Style/EmptyLines:
25+
Enabled: true
26+
2327
# In a regular class definition, no empty lines around the body.
2428
Style/EmptyLinesAroundClassBody:
2529
Enabled: true

actioncable/lib/action_cable/channel/base.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ def unsubscribe_from_channel # :nodoc:
177177
end
178178
end
179179

180-
181180
protected
182181
# Called once a consumer has become a subscriber of the channel. Usually the place to setup any streams
183182
# you want this channel to be sending to the subscriber.

actioncable/test/subscription_adapter/common.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ def teardown
2323
[@rx_adapter, @tx_adapter].uniq.each(&:shutdown)
2424
end
2525

26-
2726
def subscribe_as_queue(channel, adapter = @rx_adapter)
2827
queue = Queue.new
2928

@@ -41,7 +40,6 @@ def subscribe_as_queue(channel, adapter = @rx_adapter)
4140
adapter.unsubscribe(channel, callback) if subscribed.set?
4241
end
4342

44-
4543
def test_subscribe_and_unsubscribe
4644
subscribe_as_queue("channel") do |queue|
4745
end

actionmailer/test/base_test.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,6 @@ def welcome
380380
end
381381
end
382382

383-
384383
test "implicit multipart with several view paths uses the first one with template" do
385384
old = BaseMailer.view_paths
386385
begin

actionpack/lib/action_dispatch/journey/parser.rb

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

actionpack/lib/action_dispatch/routing/polymorphic_routes.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ def polymorphic_path(record_or_hash_or_array, options = {})
134134
opts
135135
end
136136

137-
138137
%w(edit new).each do |action|
139138
module_eval <<-EOT, __FILE__, __LINE__ + 1
140139
def #{action}_polymorphic_url(record_or_hash, options = {})
@@ -211,7 +210,6 @@ def self.polymorphic_method(recipient, record_or_hash_or_array, action, type, op
211210
method, args = builder.handle_model record_or_hash_or_array
212211
end
213212

214-
215213
if options.empty?
216214
recipient.send(method, *args)
217215
else

actionpack/test/abstract_unit.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ class TestCase
247247
end
248248
end
249249

250-
251250
class ::ApplicationController < ActionController::Base
252251
end
253252

actionpack/test/controller/caching_test.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ def test_xml_formatted_fragment_caching
277277
@store.read("views/test.host/functional_caching/formatted_fragment_cached/#{template_digest("functional_caching/formatted_fragment_cached")}")
278278
end
279279

280-
281280
def test_fragment_caching_with_variant
282281
get :formatted_fragment_cached_with_variant, format: "html", params: { v: :phone }
283282
assert_response :success

actionpack/test/controller/helper_test.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ def test_helper=(helper_module)
247247
end
248248
end
249249

250-
251250
class IsolatedHelpersTest < ActionController::TestCase
252251
class A < ActionController::Base
253252
def index

actionpack/test/controller/mime/respond_to_test.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ def json_xml_or_html
5151
end
5252
end
5353

54-
5554
def forced_xml
5655
request.format = :xml
5756

@@ -109,7 +108,6 @@ def custom_type_handling
109108
end
110109
end
111110

112-
113111
def custom_constant_handling
114112
respond_to do |type|
115113
type.html { render body: "HTML" }

0 commit comments

Comments
 (0)