Skip to content

Commit 19e5784

Browse files
committed
Layout/MultilineArrayBraceLayout
This commit enables the Rubocop Layout/MultilineArrayBraceLayout cop and addresses all offenses.
1 parent f717d62 commit 19e5784

File tree

4 files changed

+5
-15
lines changed

4 files changed

+5
-15
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +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.
27-
# SupportedStyles: symmetrical, new_line, same_line
28-
Layout/MultilineArrayBraceLayout:
29-
Exclude:
30-
- 'lib/puppet/pops/model/ast.rb'
31-
- 'lib/puppet/pops/types/iterable.rb'
32-
- 'lib/puppet/pops/types/types.rb'
33-
- 'lib/puppet/type/file/content.rb'
34-
- 'lib/puppet/util/log/destinations.rb'
35-
3625
# This cop supports safe auto-correction (--auto-correct).
3726
Layout/MultilineBlockLayout:
3827
Exclude:

lib/puppet/pops/types/types.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2052,7 +2052,8 @@ def iterable_type(guard = nil)
20522052
PIterableType.new(
20532053
PTupleType.new([
20542054
PVariantType.maybe_create(@elements.map {|se| se.key_type }),
2055-
PVariantType.maybe_create(@elements.map {|se| se.value_type })],
2055+
PVariantType.maybe_create(@elements.map {|se| se.value_type })
2056+
],
20562057
PHashType::KEY_PAIR_TUPLE_SIZE))
20572058
end
20582059
end

lib/puppet/type/file/content.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ module Puppet
5959
_('The literal value of the "content" property will be written to the file.'),
6060
# TRANSLATORS "static catalogs" should not be translated.
6161
_('The checksum retrieval functionality is being replaced by the use of static catalogs.'),
62-
_('See https://puppet.com/docs/puppet/latest/static_catalogs.html for more information.')].join(" "),
62+
_('See https://puppet.com/docs/puppet/latest/static_catalogs.html for more information.')
63+
].join(" "),
6364
:file => @resource.file,
6465
:line => @resource.line
6566
) if !@actual_content && !resource.parameter(:source)

lib/puppet/util/log/destinations.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ def handle(msg)
3737
else
3838
msg.to_s.split("\n").each do |line|
3939
@syslog.send(msg.level, "(%s) %s" % [msg.source.to_s.delete("%"),
40-
line.gsub("%", '%%')
41-
]
40+
line.gsub("%", '%%')]
4241
)
4342
end
4443
end

0 commit comments

Comments
 (0)