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.

Constant Summary collapse

DOT =
'.'.freeze

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

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



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

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



21
22
23
# File 'lib/haml_lint/reporter/progress_reporter.rb', line 21

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

#start(files) ⇒ Object



25
26
27
# File 'lib/haml_lint/reporter/progress_reporter.rb', line 25

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