Class: HamlLint::Reporter::DefaultReporter

Inherits:
HamlLint::Reporter show all
Defined in:
lib/haml_lint/reporter/default_reporter.rb

Overview

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

Instance Attribute Summary

Attributes inherited from HamlLint::Reporter

#files, #lints

Instance Method Summary collapse

Methods inherited from HamlLint::Reporter

descendants, inherited, #initialize

Constructor Details

This class inherits a constructor from HamlLint::Reporter

Instance Method Details

#report_lintsObject


5
6
7
8
9
10
11
12
13
# File 'lib/haml_lint/reporter/default_reporter.rb', line 5

def report_lints
  sorted_lints = lints.sort_by { |l| [l.filename, l.line] }

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