Skip to content

Commit

Permalink
Merge pull request #9185 from mhashizume/PUP-11768/main/argument-alig…
Browse files Browse the repository at this point in the history
…nment

Layout/ArgumentAlignment
  • Loading branch information
joshcooper committed Dec 19, 2023
2 parents 554eb96 + 2c252c9 commit 9b6c049
Show file tree
Hide file tree
Showing 90 changed files with 597 additions and 598 deletions.
5 changes: 5 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ AllCops:
- 'lib/puppet/vendor/**/*'
- 'lib/puppet/pops/parser/eparser.rb'

# This cop would completely reformat defaults, so we skip it for now.
Layout/ArgumentAlignment:
Exclude:
- 'lib/puppet/defaults.rb'

# puppet uses symbol booleans in types and providers to work around long standing
# bugs when trying to manage falsey pararameters and properties
Lint/BooleanSymbol:
Expand Down
6 changes: 0 additions & 6 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ Layout/AccessModifierIndentation:
- 'lib/puppet/util/command_line/trollop.rb'
- 'lib/puppet/util/run_mode.rb'

# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: with_first_argument, with_fixed_indentation
Layout/ArgumentAlignment:
Enabled: false

# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: with_first_element, with_fixed_indentation
Expand Down
2 changes: 1 addition & 1 deletion lib/hiera/scope.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def safe_lookupvar(key)
# do nothing
when :warning
Puppet.warn_once(Puppet::Parser::Scope::UNDEFINED_VARIABLES_KIND, _("Variable: %{name}") % { name: key },
_("Undefined variable '%{name}'; %{reason}") % { name: key, reason: reason } )
_("Undefined variable '%{name}'; %{reason}") % { name: key, reason: reason } )
when :error
raise ArgumentError, _("Undefined variable '%{name}'; %{reason}") % { name: key, reason: reason }
end
Expand Down
4 changes: 2 additions & 2 deletions lib/puppet/face/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ def warn_default_section(section_name)

def report_section_and_environment(section_name, environment_name)
$stderr.puts colorize(:hyellow,
_("Resolving settings from section '%{section_name}' in environment '%{environment_name}'") %
{ section_name: section_name, environment_name: environment_name })
_("Resolving settings from section '%{section_name}' in environment '%{environment_name}'") %
{ section_name: section_name, environment_name: environment_name })
end

action(:set) do
Expand Down
4 changes: 2 additions & 2 deletions lib/puppet/face/module/list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
modules_by_num_requires = modules.sort_by {|m| m.required_by.size}
@seen = {}
tree = list_build_tree(modules_by_num_requires, [], nil,
:label_unmet => true, :path => path, :label_invalid => false)
:label_unmet => true, :path => path, :label_invalid => false)
else
tree = []
modules.sort_by { |mod| mod.forge_name or mod.name }.each do |mod|
Expand Down Expand Up @@ -229,7 +229,7 @@ def list_build_tree(list, ancestors=[], parent=nil, params={})
node[:dependencies] << { :text => str }
end
node[:dependencies] += list_build_tree(mod.dependencies_as_modules,
ancestors + [mod], mod, params)
ancestors + [mod], mod, params)
end

node
Expand Down
Loading

0 comments on commit 9b6c049

Please sign in to comment.