Class: HamlLint::Reporter::ProgressReporter

Inherits:
HamlLint::Reporter show all
Includes:
Utils
Defined in:
lib/haml_lint/reporter/progress_reporter.rb

Overview

Outputs files as they are output as a simple symbol, then outputs a summary of each lint.

Direct Known Subclasses

DisabledConfigReporter

Constant Summary collapse

DOT =
'.'

Instance Method Summary collapse

Methods included from Utils

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

Methods inherited from HamlLint::Reporter

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

Methods included from Hooks

#added_lint

Constructor Details

This class inherits a constructor from HamlLint::Reporter

Instance Method Details

#display_report(report) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/haml_lint/reporter/progress_reporter.rb', line 14

def display_report(report)
  lints = report.lints

  log.log("\n\nOffenses:\n", true) if lints.any?
  lints.each { |lint| print_lint(lint) }

  print_summary(report)
end

#finished_file(_file, lints) ⇒ Object



23
24
25
# File 'lib/haml_lint/reporter/progress_reporter.rb', line 23

def finished_file(_file, lints)
  report_file_as_mark(lints)
end

#start(files) ⇒ Object



27
28
29
# File 'lib/haml_lint/reporter/progress_reporter.rb', line 27

def start(files)
  log.log("Inspecting #{pluralize('file', count: files.size)}", true)
end