]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
(maint) Rubocop exclusions added pdksync_maint/pdk_update_20-04
authordavid22swan <david.swan@puppet.com>
Thu, 21 Apr 2022 09:14:15 +0000 (10:14 +0100)
committerdavid22swan <david.swan@puppet.com>
Thu, 21 Apr 2022 09:14:15 +0000 (10:14 +0100)
lib/puppet/provider/firewallchain/iptables_chain.rb
lib/puppet/type/firewall.rb
lib/puppet/util/firewall.rb

index ec135d85f8e145058731490f52f56a77479a870d..fb02753be0029c901764c066973451f0074d3d93 100644 (file)
@@ -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
index d2ece90d3bf0d5546f9b4f03453b7c846eb13684..612dd1515c91b618191009a0cf320bbfd88b9ac9 100644 (file)
@@ -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}\"")
index ffa83f352315c53b55fb2b513b09e21c1cacec09..666347e8b0c2657e7516d71e6fab66019da07903 100644 (file)
@@ -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