Class: Tuxedo::Formatters::CaneTextFormatter

Inherits:
BaseTextFormatter show all
Defined in:
lib/tuxedo/formatters/cane_text_formatter.rb

Instance Attribute Summary

Attributes inherited from BaseFormatter

#output

Instance Method Summary collapse

Methods inherited from BaseTextFormatter

#message

Methods included from Tty

#capture_stderr, #capture_stdout, color_enabled?, def_color, #escape, #terminal_size, #terminal_size_available?, #with_color

Methods inherited from BaseFormatter

#initialize

Constructor Details

This class inherits a constructor from Tuxedo::Formatters::BaseFormatter

Instance Method Details

#format(violations) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/tuxedo/formatters/cane_text_formatter.rb', line 6

def format(violations)
  with_color(STDOUT.tty?) do
    format_violations_of_type(violations, "AbcMaxViolation")
    format_style_violations(violations)
    format_violations_of_type(violations, "SyntaxViolation")
    format_violations_of_type(violations, "ThresholdViolation")
    format_violations_of_type(violations, "UndocumentedClassViolation", :line_number)
  end
end