lib/scss_lint/reporter/default_reporter.rb in scss-lint-0.20.3 vs lib/scss_lint/reporter/default_reporter.rb in scss-lint-0.21.0
- old
+ new
@@ -1,14 +1,12 @@
-require 'colorize'
-
module SCSSLint
# Reports a single line per lint.
class Reporter::DefaultReporter < Reporter
def report_lints
if lints.any?
lints.map do |lint|
- type = lint.error? ? '[E]'.red : '[W]'.yellow
- "#{lint.filename.cyan}:" << "#{lint.line}".magenta <<
+ type = lint.error? ? '[E]'.color(:red) : '[W]'.color(:yellow)
+ "#{lint.filename.color(:cyan)}:" << "#{lint.line}".color(:magenta) <<
" #{type} #{lint.description}"
end.join("\n") + "\n"
end
end
end