lib/coffeelint.rb in coffeelint-0.2.6 vs lib/coffeelint.rb in coffeelint-0.2.7

- old
+ new

@@ -67,13 +67,13 @@ if errors.length == 0 puts " #{good} " + Coffeelint.green(name, pretty_output) return true else - failed = false + no_failures = true if errors.any? {|e| e["level"] == "error"} - failed = true + no_failures = false puts " #{bad} " + Coffeelint.red(name, pretty_output) else puts " #{warn} " + Coffeelint.yellow(name, pretty_output) end @@ -91,10 +91,10 @@ print bad + " " print Coffeelint.red(disp, pretty_output) end puts ": #{error["message"]}. #{error["context"]}." end - return failed + return no_failures end end def self.run_test(file, config = {}) pretty_output = config.has_key?(:pretty_output) ? config.delete(:pretty_output) : true