Class: Claws::Formatter::Github

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

Class Method Summary collapse

Class Method Details

.report_violations(violations) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/claws/formatter/github.rb', line 4

def self.report_violations(violations)
  violations.each do |v|
    printf(
      "::%<severity>s file=%<file>s,line=%<line>d::%<message>s\n",
      severity: :error,
      file: v.file,
      line: v.line,
      message: v.description.gsub("\n", "%0A")
    )
  end
end