Class: Pronto::Formatter::TextFormatter
- Inherits:
-
Object
- Object
- Pronto::Formatter::TextFormatter
- Defined in:
- lib/pronto/formatter/text_formatter.rb
Instance Method Summary collapse
Instance Method Details
#format(messages, _) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/pronto/formatter/text_formatter.rb', line 4 def format(, _) .map do || level = .level[0].upcase line = .line lineno = line.new_lineno if line path = .path commit_sha = .commit_sha[0..6] if .commit_sha location = (path.nil? && lineno.nil?) ? commit_sha : "#{path}:#{lineno}" "#{location} #{level}: #{.msg}" end end |