Skip to content

Commit b8d5099

Browse files
committed
Layout/AccessModifierIndentation
This commit enables the Rubocop Layout/AccessModifierIndentation cop and addresses all offenses.
1 parent d3d3f48 commit b8d5099

File tree

9 files changed

+8
-22
lines changed

9 files changed

+8
-22
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +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: outdent, indent
28-
Layout/AccessModifierIndentation:
29-
Exclude:
30-
- 'lib/puppet/module_tool/install_directory.rb'
31-
- 'lib/puppet/pops/evaluator/collector_transformer.rb'
32-
- 'lib/puppet/provider/service/init.rb'
33-
- 'lib/puppet/provider/service/upstart.rb'
34-
- 'lib/puppet/settings/config_file.rb'
35-
- 'lib/puppet/settings/file_setting.rb'
36-
- 'lib/puppet/util/command_line/trollop.rb'
37-
- 'lib/puppet/util/run_mode.rb'
38-
3925
# This cop supports safe auto-correction (--auto-correct).
4026
# Configuration parameters: EnforcedStyle, IndentationWidth.
4127
# SupportedStyles: with_first_element, with_fixed_indentation

lib/puppet/module_tool/install_directory.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def prepare(module_name, version)
2626
end
2727
end
2828

29-
private
29+
private
3030

3131
ERROR_MAPPINGS = {
3232
Errno::EACCES => PermissionDeniedCreateInstallDirectoryError,

lib/puppet/pops/evaluator/collector_transformer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def transform(o, scope)
5050
newcoll
5151
end
5252

53-
protected
53+
protected
5454

5555
def query(o, scope)
5656
@@query_visitor.visit_this_1(self, o, scope)

lib/puppet/provider/service/init.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def statuscmd
183183
(@resource[:hasstatus] == :true) && [initscript, :status]
184184
end
185185

186-
private
186+
private
187187

188188
def self.is_init?(script = initscript)
189189
file = Puppet::FileSystem.pathname(script)

lib/puppet/provider/service/upstart.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def status
192192
end
193193
end
194194

195-
private
195+
private
196196
def is_upstart?(script = initscript)
197197
Puppet::FileSystem.exist?(script) && script.match(/\/etc\/init\/\S+\.conf/)
198198
end

lib/puppet/settings/config_file.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def has_metadata?
7878
Meta = Struct.new(:owner, :group, :mode)
7979
NO_META = Meta.new(nil, nil, nil)
8080

81-
private
81+
private
8282

8383
def unique_sections_in(ini, file, allowed_section_names)
8484
ini.section_lines.collect do |section|

lib/puppet/settings/file_setting.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def value
4848
end
4949
end
5050

51-
private
51+
private
5252
def safe_to_use_settings_value?
5353
@settings[:mkusers] or @settings.send(@available_method)
5454
end

lib/puppet/util/command_line/trollop.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ def die arg, msg
560560
exit(-1)
561561
end
562562

563-
private
563+
private
564564

565565
## yield successive arg, parameter pairs
566566
def each_arg args

lib/puppet/util/run_mode.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def log_dir
113113
which_dir(File.join(windows_common_base("puppet/var/log")), "~/.puppetlabs/var/log")
114114
end
115115

116-
private
116+
private
117117

118118
def windows_common_base(*extra)
119119
[ENV['ALLUSERSPROFILE'], "PuppetLabs"] + extra

0 commit comments

Comments
 (0)