From: david22swan Date: Thu, 21 Apr 2022 09:14:15 +0000 (+0100) Subject: (maint) Rubocop exclusions added X-Git-Tag: v3.5.0~3^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=68621c991319bf683fbd83c9ad1c2dcb6b9b487e;p=puppet-modules%2Fpuppetlabs-firewall.git (maint) Rubocop exclusions added --- diff --git a/lib/puppet/provider/firewallchain/iptables_chain.rb b/lib/puppet/provider/firewallchain/iptables_chain.rb index ec135d8..fb02753 100644 --- a/lib/puppet/provider/firewallchain/iptables_chain.rb +++ b/lib/puppet/provider/firewallchain/iptables_chain.rb @@ -143,7 +143,7 @@ Puppet::Type.type(:firewallchain).provide :iptables_chain do chains = [] MAPPING.each do |p, c| - begin + begin # rubocop:disable Style/RedundantBegin c[:save].call.each_line do |line| if line =~ c[:re] name = Regexp.last_match(1) + ':' + ((table == 'filter') ? 'filter' : table) + ':' + p.to_s diff --git a/lib/puppet/type/firewall.rb b/lib/puppet/type/firewall.rb index d2ece90..612dd15 100644 --- a/lib/puppet/type/firewall.rb +++ b/lib/puppet/type/firewall.rb @@ -315,7 +315,7 @@ Puppet::Type.newtype(:firewall) do end_addr = matches[2] [start_addr, end_addr].each do |addr| - begin + begin # rubocop:disable Style/RedundantBegin @resource.host_to_ip(addr) rescue StandardError raise("Invalid IP address \"#{addr}\" in range \"#{value}\"") @@ -372,7 +372,7 @@ Puppet::Type.newtype(:firewall) do end_addr = matches[2] [start_addr, end_addr].each do |addr| - begin + begin # rubocop:disable Style/RedundantBegin @resource.host_to_ip(addr) rescue StandardError raise("Invalid IP address \"#{addr}\" in range \"#{value}\"") diff --git a/lib/puppet/util/firewall.rb b/lib/puppet/util/firewall.rb index ffa83f3..666347e 100644 --- a/lib/puppet/util/firewall.rb +++ b/lib/puppet/util/firewall.rb @@ -122,7 +122,7 @@ module Puppet::Util::Firewall new_value = nil Resolv.each_address(value) do |addr| - begin + begin # rubocop:disable Style/RedundantBegin new_value = Puppet::Util::IPCidr.new(addr, family) break rescue # looking for the one that works # rubocop:disable Lint/SuppressedException