Class: SCSSLint::Reporter::DefaultReporter
- Inherits:
-
SCSSLint::Reporter
- Object
- SCSSLint::Reporter
- SCSSLint::Reporter::DefaultReporter
- Defined in:
- lib/scss_lint/reporter/default_reporter.rb
Overview
Reports a single line per lint.
Instance Attribute Summary
Attributes inherited from SCSSLint::Reporter
Instance Method Summary collapse
Methods inherited from SCSSLint::Reporter
Constructor Details
This class inherits a constructor from SCSSLint::Reporter
Instance Method Details
#report_lints ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/scss_lint/reporter/default_reporter.rb', line 4 def report_lints return unless lints.any? lints.map do |lint| type = lint.error? ? '[E]'.color(:red) : '[W]'.color(:yellow) linter_name = "#{lint.linter.name}: ".color(:green) if lint.linter = "#{linter_name}#{lint.description}" "#{lint.filename.color(:cyan)}:" << "#{lint.location.line}".color(:magenta) << " #{type} #{message}" end.join("\n") + "\n" end |