Class: Pronto::Formatter::JsonFormatter
- Defined in:
- lib/pronto/formatter/json_formatter.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
Class Method Details
.name ⇒ Object
6 7 8 |
# File 'lib/pronto/formatter/json_formatter.rb', line 6 def self.name 'json' end |
Instance Method Details
#format(messages, _repo, _patches) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/pronto/formatter/json_formatter.rb', line 10 def format(, _repo, _patches) .map do || lineno = .line.new_lineno if .line result = { level: .level[0].upcase, message: .msg } result[:path] = .path if .path result[:line] = lineno if lineno result[:commit_sha] = .commit_sha if .commit_sha result[:runner] = .runner if .runner result end.to_json end |