Skip to content

Commit 013a7b3

Browse files
committed
Layout/BlockAlignment
This commit enables the Rubocop Layout/BlockAlignment cop.
1 parent 99b6810 commit 013a7b3

File tree

7 files changed

+9
-21
lines changed

7 files changed

+9
-21
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,6 @@ Layout/AssignmentIndentation:
6969
- 'lib/puppet/util.rb'
7070
- 'lib/puppet/util/windows/daemon.rb'
7171

72-
# This cop supports safe auto-correction (--auto-correct).
73-
# Configuration parameters: EnforcedStyleAlignWith.
74-
# SupportedStylesAlignWith: either, start_of_block, start_of_line
75-
Layout/BlockAlignment:
76-
Exclude:
77-
- 'lib/puppet/defaults.rb'
78-
- 'lib/puppet/node/environment.rb'
79-
- 'lib/puppet/parser/functions/lookup.rb'
80-
- 'lib/puppet/provider/package/dnfmodule.rb'
81-
- 'lib/puppet/type/file.rb'
82-
- 'lib/puppet/util/windows/principal.rb'
83-
8472
# This cop supports safe auto-correction (--auto-correct).
8573
# Configuration parameters: EnforcedStyle, IndentOneStep, IndentationWidth.
8674
# SupportedStyles: case, end

lib/puppet/defaults.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -493,10 +493,10 @@ def self.initialize_default_settings!(settings)
493493
currently cannot daemonize).",
494494
:short => "D",
495495
:hook => proc do |value|
496-
if value and Puppet::Util::Platform.windows?
497-
raise "Cannot daemonize on Windows"
498-
end
499-
end
496+
if value and Puppet::Util::Platform.windows?
497+
raise "Cannot daemonize on Windows"
498+
end
499+
end
500500
},
501501
:maximum_uid => {
502502
:default => 4294967290,

lib/puppet/node/environment.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ def perform_initial_import
597597
parse_results = Puppet::FileSystem::PathPattern.absolute(File.join(file, '**/*')).glob.select {|globbed_file| globbed_file.end_with?('.pp')}.sort.map do | file_to_parse |
598598
parser.file = file_to_parse
599599
parser.parse
600-
end
600+
end
601601
# Use a parser type specific merger to concatenate the results
602602
Puppet::Parser::AST::Hostclass.new('', :code => Puppet::Parser::ParserFactory.code_merger.concatenate(parse_results))
603603
else

lib/puppet/parser/functions/lookup.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,5 @@ module Puppet::Parser::Functions
129129
130130
ENDHEREDOC
131131
Error.is4x('lookup')
132-
end
132+
end
133133
end

lib/puppet/provider/package/dnfmodule.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def self.instances
6464
def query
6565
pkg = self.class.instances.find do |package|
6666
@resource[:name] == package.name
67-
end
67+
end
6868
pkg ? pkg.properties : nil
6969
end
7070

lib/puppet/type/file.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ def self.remove_less_specific_files(files, parent_path, existing_files, &block)
665665
files.reject { |file|
666666
path = (yield file).split(::File::Separator)
667667
other_paths.any? { |p| path[0,p.length] == p }
668-
}
668+
}
669669
end
670670

671671
# A simple method for determining whether we should be recursing.

lib/puppet/util/windows/principal.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def self.lookup_account_name(system_name = nil, sanitize = true, account_name)
8181
return lookup_account_sid(
8282
system_name,
8383
sid_ptr.read_bytes(sid_length_ptr.read_dword).unpack('C*'))
84-
end
84+
end
8585
end
8686
end
8787
end

0 commit comments

Comments
 (0)