Skip to content

Commit 6aac6b2

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

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
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/MultilineBlockLayout:
27-
Exclude:
28-
- 'lib/puppet/provider/service/freebsd.rb'
29-
3025
# This cop supports safe auto-correction (--auto-correct).
3126
# Configuration parameters: EnforcedStyle.
3227
# SupportedStyles: symmetrical, new_line, same_line

lib/puppet/provider/service/freebsd.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,22 +89,22 @@ def rc_add(service, rcvar, yesno)
8989
append = "\# Added by Puppet\n#{rcvar}_enable=\"#{yesno}\"\n"
9090
# First, try the one-file-per-service style
9191
if Puppet::FileSystem.exist?(rcconf_dir)
92-
File.open(rcconf_dir + "/#{service}", File::WRONLY | File::APPEND | File::CREAT, 0644) {
93-
|f| f << append
94-
self.debug("Appended to #{f.path}")
92+
File.open(rcconf_dir + "/#{service}", File::WRONLY | File::APPEND | File::CREAT, 0644) { |f|
93+
f << append
94+
self.debug("Appended to #{f.path}")
9595
}
9696
else
9797
# Else, check the local rc file first, but don't create it
9898
if Puppet::FileSystem.exist?(rcconf_local)
99-
File.open(rcconf_local, File::WRONLY | File::APPEND) {
100-
|f| f << append
101-
self.debug("Appended to #{f.path}")
99+
File.open(rcconf_local, File::WRONLY | File::APPEND) { |f|
100+
f << append
101+
self.debug("Appended to #{f.path}")
102102
}
103103
else
104104
# At last use the standard rc.conf file
105-
File.open(rcconf, File::WRONLY | File::APPEND | File::CREAT, 0644) {
106-
|f| f << append
107-
self.debug("Appended to #{f.path}")
105+
File.open(rcconf, File::WRONLY | File::APPEND | File::CREAT, 0644) { |f|
106+
f << append
107+
self.debug("Appended to #{f.path}")
108108
}
109109
end
110110
end

0 commit comments

Comments
 (0)