Skip to content

Commit 175e6cf

Browse files
committed
Layout/EmptyLinesAroundBlockBody
This commit enables the Rubocop Layout/EmptyLinesAroundBlockBody cop and addresses all offenses.
1 parent 683c6bc commit 175e6cf

Some content is hidden

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

73 files changed

+0
-90
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@ Layout/EmptyLineAfterGuardClause:
3030
Layout/EmptyLineAfterMagicComment:
3131
Enabled: false
3232

33-
# This cop supports safe auto-correction (--auto-correct).
34-
# Configuration parameters: EnforcedStyle.
35-
# SupportedStyles: empty_lines, no_empty_lines
36-
Layout/EmptyLinesAroundBlockBody:
37-
Enabled: false
38-
3933
# This cop supports safe auto-correction (--auto-correct).
4034
# Configuration parameters: EnforcedStyle.
4135
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only

lib/puppet/confine_collection.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ def summary
4242
value = klass.summarize(list)
4343
next if (value.respond_to?(:length) and value.length == 0) or (value == 0)
4444
result[klass.name] = value
45-
4645
end
4746
result
4847
end

lib/puppet/face/config.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ def report_section_and_environment(section_name, environment_name)
136136
EOT
137137

138138
when_invoked do |name, value, options|
139-
140139
@default_section = false
141140
if options[:section] == DEFAULT_SECTION_MARKER
142141
options[:section] = DEFAULT_SECTION
@@ -219,7 +218,6 @@ def report_section_and_environment(section_name, environment_name)
219218
EOT
220219

221220
when_invoked do |name, options|
222-
223221
@default_section = false
224222
if options[:section] == DEFAULT_SECTION_MARKER
225223
options[:section] = DEFAULT_SECTION
@@ -230,7 +228,6 @@ def report_section_and_environment(section_name, environment_name)
230228
if Puppet::FileSystem.exist?(path)
231229
Puppet::FileSystem.open(path, nil, 'r+:UTF-8') do |file|
232230
Puppet::Settings::IniFile.update(file) do |config|
233-
234231
# delete from both master section and server section
235232
if options[:section] == "master" || options[:section] == "server"
236233
master_setting_string = config.delete("master", name)

lib/puppet/face/epp.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,6 @@
333333

334334
compiler = create_compiler(options)
335335
compiler.with_context_overrides('For rendering epp') do
336-
337336
# Print to a buffer since the face needs to return the resulting string
338337
# and the face API is "all or nothing"
339338
#
@@ -562,5 +561,4 @@ def effective_template(file, env)
562561
nil
563562
end
564563
end
565-
566564
end

lib/puppet/face/help.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,5 +239,4 @@ def is_face_app?(appname)
239239
# that you can't use the 'private' keyword inside of a Face definition.
240240
# See #14205.
241241
#private :is_face_app?
242-
243242
end

lib/puppet/face/node/clean.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# frozen_string_literal: true
22
Puppet::Face.define(:node, '0.0.1') do
33
action(:clean) do
4-
54
summary _("Clean up signed certs, cached facts, node objects, and reports for a node stored by the puppetmaster")
65
arguments _("<host1> [<host2> ...]")
76
description <<-'EOT'

lib/puppet/functions.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,6 @@ def method3x
737737
# When function is not an rvalue function, make sure it produces nil
738738
#
739739
the_class.class_eval do
740-
741740
# Bypasses making the call via the dispatcher to make sure errors
742741
# are reported exactly the same way as in 3x. The dispatcher is still needed as it is
743742
# used to support other features than calling.

lib/puppet/functions/call.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,4 @@ def call_impl_block(scope, function_name, *args, &block)
7777
def call_deferred(scope, deferred)
7878
Puppet::Pops::Evaluator::DeferredResolver.resolve(deferred, scope.compiler)
7979
end
80-
8180
end

lib/puppet/functions/camelcase.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
# Would both result in `['AbcDef', 'BcdXyz']`
3131
#
3232
Puppet::Functions.create_function(:camelcase) do
33-
3433
dispatch :on_numeric do
3534
param 'Numeric', :arg
3635
end

lib/puppet/functions/capitalize.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
# Would both result in `['Abc', 'Bcd']`
3030
#
3131
Puppet::Functions.create_function(:capitalize) do
32-
3332
dispatch :on_numeric do
3433
param 'Numeric', :arg
3534
end

0 commit comments

Comments
 (0)