Sha256: 12fad108edc43714eb2678501051a2e8b2464c7738a887fec5ce0d715ffbcef3
Contents?: true
Size: 789 Bytes
Versions: 18
Compression:
Stored size: 789 Bytes
Contents
module CC module Analyzer module Formatters class JSONFormatter < Formatter def initialize(filesystem) @filesystem = filesystem @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
18 entries across 18 versions & 1 rubygems