Class: HamlLint::Reporter::DefaultReporter

Inherits:
HamlLint::Reporter show all
Includes:
Utils
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 Method Summary collapse

Methods included from Utils

#pluralize, #print_lint, #print_location, #print_message, #print_summary, #print_summary_files, #print_summary_lints, #print_type

Methods inherited from HamlLint::Reporter

available, available?, cli_name, descendants, inherited, #initialize

Methods included from Hooks

#finished_file, #start

Constructor Details

This class inherits a constructor from HamlLint::Reporter

Instance Method Details

#added_lint(lint, report) ⇒ Object



11
12
13
# File 'lib/haml_lint/reporter/default_reporter.rb', line 11

def added_lint(lint, report)
  print_lint(lint) if lint.severity >= report.fail_level
end

#display_report(report) ⇒ Object



15
16
17
# File 'lib/haml_lint/reporter/default_reporter.rb', line 15

def display_report(report)
  print_summary(report)
end