bin/check-tripwire.rb in sensu-plugins-tripwire-0.0.3 vs bin/check-tripwire.rb in sensu-plugins-tripwire-1.0.0
- old
+ new
@@ -131,11 +131,11 @@
if (m = line.match(severity_level))
current_violation[:level] = m[1].to_i
end
- if (m = line.match(violation_type)) && current_violation # rubocop:disable AssignmentInCondition
+ if (m = line.match(violation_type)) && current_violation
current_list = []
current_violation[m[1]] = current_list
end
if (m = line.match(quoted)) && current_list
@@ -161,8 +161,8 @@
critical violation.to_json
elsif violation[:level] >= config[:warn].to_i
warning violation.to_json
end
end
- ok 'no violations' if violations.size == 0
+ ok 'no violations' if violations.size == 0 # rubocop:disable Style/ZeroLengthPredicate
end
end