Commit ce72fc0c authored by Stan Hu's avatar Stan Hu

Simplify static-analysis count for ignored warnings

This adds a minor performance optimization to avoid allocation of an
array.
parent e98fd6f4
......@@ -35,8 +35,7 @@ ALLOWED_WARNINGS = [
def warning_count(static_analysis)
static_analysis.warned_results
.reject { |result| ALLOWED_WARNINGS.include?(result.stderr.strip) }
.count
.count { |result| !ALLOWED_WARNINGS.include?(result.stderr.strip) }
end
def jobs_to_run(node_index, node_total)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment