def self.compare options
require 'json'
require 'brakeman/differ'
raise ArgumentError.new("Comparison file doesn't exist") unless File.exist? options[:previous_results_json]
begin
previous_results = JSON.parse(File.read(options[:previous_results_json]), :symbolize_names => true)[:warnings]
rescue JSON::ParserError
self.notify "Error parsing comparison file: #{options[:previous_results_json]}"
exit!
end
tracker = run(options)
new_results = JSON.parse(tracker.report.to_json, :symbolize_names => true)[:warnings]
Brakeman::Differ.new(new_results, previous_results).diff
end