Class: Pronto::Formatter::AnnotationsFormatter

Inherits:
Base
  • Object
show all
Defined in:
lib/pronto/annotations_formatter.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.nameObject



11
12
13
# File 'lib/pronto/annotations_formatter.rb', line 11

def self.name
  "annotations"
end

Instance Method Details

#format(messages, _repo, _patches) ⇒ Object

{

"message": "Some message",
"level": "warning",
"file": "some_file.rb",
"line": { "start": 1, "end": 1 },
"title": "The warning issuer, the runner"

}



22
23
24
# File 'lib/pronto/annotations_formatter.rb', line 22

def format(messages, _repo, _patches)
  messages.map { |m| build_report_line(m) }.to_json
end