Skip to content

Commit d06220c

Browse files
committed
Layout/ClosingParenthesisIndentation
This commit enables the Rubocop Layout/ClosingParenthesisIndentation cop.
1 parent 3e8e5c7 commit d06220c

File tree

18 files changed

+26
-30
lines changed

18 files changed

+26
-30
lines changed

.rubocop_todo.yml

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

25-
# This cop supports safe auto-correction (--auto-correct).
26-
Layout/ClosingParenthesisIndentation:
27-
Enabled: false
28-
2925
# This cop supports safe auto-correction (--auto-correct).
3026
# Configuration parameters: AllowForAlignment.
3127
Layout/CommentIndentation:

lib/puppet/application.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def initialize(command_line = Puppet::Util::CommandLine.new)
364364
def app_defaults
365365
Puppet::Settings.app_defaults_for_run_mode(self.class.run_mode).merge(
366366
:name => name
367-
)
367+
)
368368
end
369369

370370
# Initialize application defaults. It's usually not necessary to override this method.

lib/puppet/defaults.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def self.initialize_default_settings!(settings)
117117
:desc => "The name of the application, if we are running as one. The
118118
default is essentially $0 without the path or `.rb`.",
119119
}
120-
)
120+
)
121121

122122
settings.define_settings(:main,
123123
:logdir => {
@@ -1298,7 +1298,7 @@ def self.initialize_default_settings!(settings)
12981298
:default => nil,
12991299
:desc => "The address the agent should use to initiate requests.",
13001300
},
1301-
)
1301+
)
13021302

13031303
settings.define_settings(:environment,
13041304
:manifest => {
@@ -2135,7 +2135,7 @@ def self.initialize_default_settings!(settings)
21352135
21362136
For more info, see [the ENC documentation](https://puppet.com/docs/puppet/latest/nodes_external.html).",
21372137
}
2138-
)
2138+
)
21392139

21402140
settings.define_settings(
21412141
:ldap,
@@ -2205,7 +2205,7 @@ def self.initialize_default_settings!(settings)
22052205
have one already set. Generally, it should be the 'ou=Hosts'
22062206
branch under your main directory.",
22072207
}
2208-
)
2208+
)
22092209

22102210
settings.define_settings(:server,
22112211
:storeconfigs => {

lib/puppet/ffi/windows/constants.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ module Constants
203203
:TokenSecurityAttributes,
204204
:TokenIsRestricted,
205205
:MaxTokenInfoClass
206-
)
206+
)
207207

208208
# Service error codes
209209
# https://docs.microsoft.com/en-us/windows/desktop/debug/system-error-codes--1000-1299-

lib/puppet/functions/dig.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def dig(data, *args)
4646
'SLICE_ERROR',
4747
{'walked_path' => walked_path, 'value_type' => t},
4848
'EXPECTED_COLLECTION'
49-
)
49+
)
5050
raise Puppet::ErrorWithData.new(error_data, msg)
5151
end
5252

@@ -59,7 +59,7 @@ def dig(data, *args)
5959
'SLICE_ERROR',
6060
{'walked_path' => walked_path, 'index_type' => t},
6161
'EXPECTED_INTEGER_INDEX'
62-
)
62+
)
6363
raise Puppet::ErrorWithData.new(error_data, msg)
6464
end
6565
d[k]

lib/puppet/module_tool/applications/installer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def run
187187
:requested_name => name,
188188
:requested_version => options[:version] || graph.dependencies[name].max.version.to_s,
189189
:unsatisfied => unsatisfied
190-
)
190+
)
191191
end
192192

193193
unless forced?

lib/puppet/pal/pal_impl.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def self.in_tmp_environment(env_name,
235235
facts: nil,
236236
variables: {},
237237
&block
238-
)
238+
)
239239
assert_non_empty_string(env_name, _("temporary environment name"))
240240
# TRANSLATORS: do not translate variable name string in these assertions
241241
assert_optionally_empty_array(modulepath, 'modulepath')
@@ -249,7 +249,7 @@ def self.in_tmp_environment(env_name,
249249
in_environment_context(
250250
Puppet::Environments::Static.new(env), # The tmp env is the only known env
251251
env, facts, variables, &block
252-
)
252+
)
253253
end
254254

255255
# Defines the context in which to perform puppet operations (evaluation, etc)
@@ -287,7 +287,7 @@ def self.in_environment(env_name,
287287
facts: nil,
288288
variables: {},
289289
&block
290-
)
290+
)
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/parser/ast/resource.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def evaluate(scope)
5252
:source => scope.source,
5353
:scope => scope,
5454
:strict => true
55-
)
55+
) # rubocop:disable Layout/ClosingParenthesisIndentation
5656

5757
if resource.resource_type.is_a? Puppet::Resource::Type
5858
resource.resource_type.instantiate_resource(scope, resource)

lib/puppet/parser/functions/create_resources.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,6 @@
106106
:add => false
107107
)
108108
end.compact
109-
)
109+
)
110110
end.flatten.compact
111111
end

lib/puppet/parser/functions/fail.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Fail with a parse error. Any parameters will be stringified,
77
concatenated, and passed to the exception-handler.
88
DOC
9-
) do |vals|
9+
) do |vals|
1010
vals = vals.collect { |s| s.to_s }.join(" ") if vals.is_a? Array
1111
raise Puppet::ParseError, vals.to_s
1212
end

0 commit comments

Comments
 (0)