fix: resolve warnings/errors
All checks were successful
Build / precommit (pull_request) Successful in 3m31s
All checks were successful
Build / precommit (pull_request) Successful in 3m31s
- modules/libs/lib/facter/pve_nodelist.rb:11:5: W: [Correctable] Lint/RedundantCopDisableDirective: Unnecessary disabling of Metrics/BlockNesting.a - site/profiles/manifests/puppet/puppetboard.pp - WARNING: there should be a single space before '=>' on line 158, column 14 on line 158 (check: space_before_arrow) - site/profiles/manifests/consul/client.pp - WARNING: there should be a single space before '=>' on line 93, column 13 on line 93 (check: space_before_arrow) - site/profiles/manifests/ntp/client.pp - WARNING: there should be a single space before '=>' on line 44, column 16 on line 44 (check: space_before_arrow) - site/profiles/manifests/puppet/enc.pp - WARNING: there should be a single space before '=>' on line 14, column 11 on line 14 (check: space_before_arrow) - site/profiles/manifests/puppet/enc.pp - WARNING: there should be a single space before '=>' on line 18, column 11 on line 18 (check: space_before_arrow) - set max block nesting to 4
This commit is contained in:
parent
46beea21d2
commit
8745c6bcb8
@ -8,3 +8,6 @@ Style/Documentation:
|
|||||||
|
|
||||||
Layout/LineLength:
|
Layout/LineLength:
|
||||||
Max: 140
|
Max: 140
|
||||||
|
|
||||||
|
Metrics/BlockNesting:
|
||||||
|
Max: 4
|
||||||
|
|||||||
@ -8,7 +8,6 @@ Facter.add('pve_nodelist') do
|
|||||||
conf_file = '/etc/pve/corosync.conf'
|
conf_file = '/etc/pve/corosync.conf'
|
||||||
node_list = {}
|
node_list = {}
|
||||||
current_node = nil
|
current_node = nil
|
||||||
# rubocop:disable Metrics/BlockNesting
|
|
||||||
|
|
||||||
if File.exist?(conf_file)
|
if File.exist?(conf_file)
|
||||||
File.foreach(conf_file) do |line|
|
File.foreach(conf_file) do |line|
|
||||||
@ -28,8 +27,6 @@ Facter.add('pve_nodelist') do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# rubocop:enable Metrics/BlockNesting
|
|
||||||
|
|
||||||
node_list.empty? ? nil : node_list
|
node_list.empty? ? nil : node_list
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user