Class: Claws::Formatter::Stdout

Inherits:
Object
  • Object
show all
Defined in:
lib/claws/formatter/stdout.rb

Class Method Summary collapse

Class Method Details

.report_violations(violations) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/claws/formatter/stdout.rb', line 4

def self.report_violations(violations)
  violations.each do |v|
    puts "Violation: #{v.name} on #{v.file}:#{v.line}".red
    puts v.description
    puts v.snippet unless v.snippet.nil?
  end
end