bin/check-cassandra-schema.rb in sensu-plugins-cassandra-2.1.0 vs bin/check-cassandra-schema.rb in sensu-plugins-cassandra-3.0.0
- old
+ new
@@ -1,6 +1,8 @@
#! /usr/bin/env ruby
+# frozen_string_literal: true
+
#
# check-cassandra-schema
#
# DESCRIPTION:
# This plugin uses Apache Cassandra's `nodetool` to check to see
@@ -66,17 +68,17 @@
out.each_line do |line|
if m = line.match(/\s+UNREACHABLE:\s+(.*)\[(.*)\]\s+$/)# rubocop:disable all
bad_nodes << m[2]
next
end
- if bad_nodes.count > 0
+ if bad_nodes.count > 0 # rubocop: disable Style/NumericPredicate
if m = line.match(/\s+(.*)\[(.*)\]\s+$/)# rubocop:disable all
bad_nodes << m[2]
end
end
end
- if bad_nodes.count > 0
+ if bad_nodes.count > 0 # rubocop: disable Style/NumericPredicate
critical('nodes ' + bad_nodes.join(', ') + ' are in schema disagreement')
else
ok
end
end