Skip to content

Commit 7b33fc3

Browse files
committed
Layout/SpaceAroundMethodCallOperator
This commit enables the Rubocop Layout/SpaceAroundMethodCallOperator cop and addresses all offenses.
1 parent f6dfecb commit 7b33fc3

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

.rubocop_todo.yml

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

25-
# This cop supports safe auto-correction (--auto-correct).
26-
Layout/SpaceAroundMethodCallOperator:
27-
Exclude:
28-
- 'lib/puppet/network/formats.rb'
29-
3025
# This cop supports safe auto-correction (--auto-correct).
3126
# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
3227
# SupportedStylesForExponentOperator: space, no_space

lib/puppet/network/formats.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def render(datum)
160160
if datum.is_a?(Hash) && datum.keys.all? { |x| x.is_a?(String) || x.is_a?(Numeric) }
161161
output = ''.dup
162162
column_a = datum.empty? ? 2 : datum.map{ |k, _v| k.to_s.length }.max + 2
163-
datum.sort_by { |k, _v| k.to_s } .each do |key, value|
163+
datum.sort_by { |k, _v| k.to_s }.each do |key, value|
164164
output << key.to_s.ljust(column_a)
165165
output << json.render(value)
166166
.chomp.gsub(/\n */) { |x| x + (' ' * column_a) }

0 commit comments

Comments
 (0)