Skip to content

Commit db74925

Browse files
committed
Layout/ParameterAlignment
This commit enables the Rubocop Layout/ParameterAlignment cop and addresses all offenses.
1 parent 39ed80f commit db74925

File tree

3 files changed

+27
-35
lines changed

3 files changed

+27
-35
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@ I18n/GetText/DecorateStringFormattingUsingPercent:
2222
I18n/RailsI18n/DecorateString:
2323
Enabled: false
2424

25-
# This cop supports safe auto-correction (--auto-correct).
26-
# Configuration parameters: EnforcedStyle, IndentationWidth.
27-
# SupportedStyles: with_first_parameter, with_fixed_indentation
28-
Layout/ParameterAlignment:
29-
Exclude:
30-
- 'lib/puppet/pal/pal_impl.rb'
31-
- 'lib/puppet/util/windows/file.rb'
32-
3325
# This cop supports safe auto-correction (--auto-correct).
3426
Layout/RescueEnsureAlignment:
3527
Exclude:

lib/puppet/pal/pal_impl.rb

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ module Pal
5858
#
5959
def self.with_script_compiler(
6060
configured_by_env: false,
61-
manifest_file: nil,
62-
code_string: nil,
63-
facts: {},
64-
variables: {},
65-
set_local_facts: true,
66-
&block
61+
manifest_file: nil,
62+
code_string: nil,
63+
facts: {},
64+
variables: {},
65+
set_local_facts: true,
66+
&block
6767
)
6868
# TRANSLATORS: do not translate variable name strings in these assertions
6969
assert_mutually_exclusive(manifest_file, code_string, 'manifest_file', 'code_string')
@@ -165,12 +165,12 @@ def self.evaluate_script_manifest(manifest_file)
165165
#
166166
def self.with_catalog_compiler(
167167
configured_by_env: false,
168-
manifest_file: nil,
169-
code_string: nil,
170-
facts: {},
171-
variables: {},
172-
target_variables: {},
173-
&block
168+
manifest_file: nil,
169+
code_string: nil,
170+
facts: {},
171+
variables: {},
172+
target_variables: {},
173+
&block
174174
)
175175
# TRANSLATORS: do not translate variable name strings in these assertions
176176
assert_mutually_exclusive(manifest_file, code_string, 'manifest_file', 'code_string')
@@ -232,11 +232,11 @@ def self.with_catalog_compiler(
232232
# @yieldparam [Puppet::Pal] context, a context that responds to Puppet::Pal methods
233233
#
234234
def self.in_tmp_environment(env_name,
235-
modulepath: [],
236-
settings_hash: {},
237-
facts: nil,
238-
variables: {},
239-
&block)
235+
modulepath: [],
236+
settings_hash: {},
237+
facts: nil,
238+
variables: {},
239+
&block)
240240
assert_non_empty_string(env_name, _("temporary environment name"))
241241
# TRANSLATORS: do not translate variable name string in these assertions
242242
assert_optionally_empty_array(modulepath, 'modulepath')
@@ -279,15 +279,15 @@ def self.in_tmp_environment(env_name,
279279
#
280280
# @api public
281281
def self.in_environment(env_name,
282-
modulepath: nil,
283-
pre_modulepath: [],
284-
post_modulepath: [],
285-
settings_hash: {},
286-
env_dir: nil,
287-
envpath: nil,
288-
facts: nil,
289-
variables: {},
290-
&block)
282+
modulepath: nil,
283+
pre_modulepath: [],
284+
post_modulepath: [],
285+
settings_hash: {},
286+
env_dir: nil,
287+
envpath: nil,
288+
facts: nil,
289+
variables: {},
290+
&block)
291291
# TRANSLATORS terms in the assertions below are names of terms in code
292292
assert_non_empty_string(env_name, 'env_name')
293293
assert_optionally_empty_array(modulepath, 'modulepath', true)

lib/puppet/util/windows/file.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def set_attributes(path, flags)
129129
# define INVALID_HANDLE_VALUE ((HANDLE)(LONG_PTR)-1)
130130
INVALID_HANDLE_VALUE = FFI::Pointer.new(-1).address
131131
def self.create_file(file_name, desired_access, share_mode, security_attributes,
132-
creation_disposition, flags_and_attributes, template_file_handle)
132+
creation_disposition, flags_and_attributes, template_file_handle)
133133

134134
result = CreateFileW(wide_string(file_name.to_s),
135135
desired_access, share_mode, security_attributes, creation_disposition,

0 commit comments

Comments
 (0)