Sha256: 7e062ce6576304b8802e8b10fa2b141e885dc3ba55a24621add61bddcae0373b
Contents?: true
Size: 742 Bytes
Versions: 12
Compression:
Stored size: 742 Bytes
Contents
module CC module Analyzer module Formatters class JSONFormatter < Formatter def initialize @has_begun = false end def started print "[" end def finished print "]\n" end def write(data) return unless data.present? document = JSON.parse(data) document["engine_name"] = current_engine.name if @has_begun print ",\n" end print document.to_json @has_begun = true end def failed(output) $stderr.puts "\nAnalysis failed with the following output:" $stderr.puts output exit 1 end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems