bin/check-smart.rb in sensu-plugins-disk-checks-5.1.3 vs bin/check-smart.rb in sensu-plugins-disk-checks-5.1.4

- old
+ new

@@ -169,26 +169,26 @@ end # Main function # def run - unless @devices.length > 0 # rubocop: disable Style/NumericPredicate + unless @devices.length > 0 exit_with( config[:no_smart_capable_disks], 'No SMART capable devices found' ) end unhealthy_disks = @devices.select { |disk| disk.smart_capable? && !disk.healthy? } unknown_disks = @devices.reject(&:smart_capable?) - if unhealthy_disks.length > 0 # rubocop: disable Style/NumericPredicate + if unhealthy_disks.length > 0 output = unhealthy_disks.map(&:health_output) output.concat(unknown_disks.map(&:capability_output)) critical output.join("\n") end - if unknown_disks.length > 0 # rubocop: disable Style/NumericPredicate + if unknown_disks.length > 0 exit_with( config[:smart_incapable_disks], unknown_disks.map(&:capability_output).join("\n") ) end