lib/cc/analyzer/formatters/plain_text_formatter.rb in codeclimate-0.9.0 vs lib/cc/analyzer/formatters/plain_text_formatter.rb in codeclimate-0.9.1

- old
+ new

@@ -10,21 +10,19 @@ def started puts colorize("Starting analysis", :green) end def write(data) - if data.present? - json = JSON.parse(data) - json["engine_name"] = current_engine.name + json = JSON.parse(data) + json["engine_name"] = current_engine.name - case json["type"].downcase - when "issue" - issues << json - when "warning" - warnings << json - else - raise "Invalid type found: #{json["type"]}" - end + case json["type"].downcase + when "issue" + issues << json + when "warning" + warnings << json + else + raise "Invalid type found: #{json["type"]}" end end def finished puts