Skip to content

Commit 9b6c049

Browse files
authored
Merge pull request #9185 from mhashizume/PUP-11768/main/argument-alignment
Layout/ArgumentAlignment
2 parents 554eb96 + 2c252c9 commit 9b6c049

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+597
-598
lines changed

.rubocop.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ AllCops:
1717
- 'lib/puppet/vendor/**/*'
1818
- 'lib/puppet/pops/parser/eparser.rb'
1919

20+
# This cop would completely reformat defaults, so we skip it for now.
21+
Layout/ArgumentAlignment:
22+
Exclude:
23+
- 'lib/puppet/defaults.rb'
24+
2025
# puppet uses symbol booleans in types and providers to work around long standing
2126
# bugs when trying to manage falsey pararameters and properties
2227
Lint/BooleanSymbol:

.rubocop_todo.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ Layout/AccessModifierIndentation:
3636
- 'lib/puppet/util/command_line/trollop.rb'
3737
- 'lib/puppet/util/run_mode.rb'
3838

39-
# This cop supports safe auto-correction (--auto-correct).
40-
# Configuration parameters: EnforcedStyle, IndentationWidth.
41-
# SupportedStyles: with_first_argument, with_fixed_indentation
42-
Layout/ArgumentAlignment:
43-
Enabled: false
44-
4539
# This cop supports safe auto-correction (--auto-correct).
4640
# Configuration parameters: EnforcedStyle, IndentationWidth.
4741
# SupportedStyles: with_first_element, with_fixed_indentation

lib/hiera/scope.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def safe_lookupvar(key)
4545
# do nothing
4646
when :warning
4747
Puppet.warn_once(Puppet::Parser::Scope::UNDEFINED_VARIABLES_KIND, _("Variable: %{name}") % { name: key },
48-
_("Undefined variable '%{name}'; %{reason}") % { name: key, reason: reason } )
48+
_("Undefined variable '%{name}'; %{reason}") % { name: key, reason: reason } )
4949
when :error
5050
raise ArgumentError, _("Undefined variable '%{name}'; %{reason}") % { name: key, reason: reason }
5151
end

lib/puppet/face/config.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ def warn_default_section(section_name)
110110

111111
def report_section_and_environment(section_name, environment_name)
112112
$stderr.puts colorize(:hyellow,
113-
_("Resolving settings from section '%{section_name}' in environment '%{environment_name}'") %
114-
{ section_name: section_name, environment_name: environment_name })
113+
_("Resolving settings from section '%{section_name}' in environment '%{environment_name}'") %
114+
{ section_name: section_name, environment_name: environment_name })
115115
end
116116

117117
action(:set) do

lib/puppet/face/module/list.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
modules_by_num_requires = modules.sort_by {|m| m.required_by.size}
9191
@seen = {}
9292
tree = list_build_tree(modules_by_num_requires, [], nil,
93-
:label_unmet => true, :path => path, :label_invalid => false)
93+
:label_unmet => true, :path => path, :label_invalid => false)
9494
else
9595
tree = []
9696
modules.sort_by { |mod| mod.forge_name or mod.name }.each do |mod|
@@ -229,7 +229,7 @@ def list_build_tree(list, ancestors=[], parent=nil, params={})
229229
node[:dependencies] << { :text => str }
230230
end
231231
node[:dependencies] += list_build_tree(mod.dependencies_as_modules,
232-
ancestors + [mod], mod, params)
232+
ancestors + [mod], mod, params)
233233
end
234234

235235
node

0 commit comments

Comments
 (0)