Class: SlimLint::Reporter::DefaultReporter

Inherits:
SlimLint::Reporter show all
Defined in:
lib/slim_lint/reporter/default_reporter.rb

Overview

Outputs lints in a simple format with the filename, line number, and lint message.

Instance Method Summary collapse

Methods inherited from SlimLint::Reporter

descendants, inherited, #initialize

Constructor Details

This class inherits a constructor from SlimLint::Reporter

Instance Method Details

#display_report(report) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/slim_lint/reporter/default_reporter.rb', line 7

def display_report(report)
  sorted_lints = report.lints.sort_by { |l| [l.filename, l.line] }

  sorted_lints.each do |lint|
    print_location(lint)
    print_type(lint)
    print_message(lint)
  end
end