lib/goodcheck/reporters/text.rb in goodcheck-2.7.0 vs lib/goodcheck/reporters/text.rb in goodcheck-3.0.0
- old
+ new
@@ -35,10 +35,12 @@
column_size = if issue.location.one_line?
issue.location.column_size
else
line.bytesize - start_column
end
- stdout.puts "#{Rainbow(issue.path).cyan}:#{start_line}:#{start_column}: #{message}"
+ rule = Rainbow("(#{issue.rule.id})").darkgray
+ severity = issue.rule.severity ? Rainbow("[#{issue.rule.severity}]").magenta : ""
+ stdout.puts "#{Rainbow(issue.path).cyan}:#{start_line}:#{start_column}: #{message} #{rule} #{severity}".strip
stdout.puts line.chomp
stdout.puts (" " * start_column_index) + Rainbow("^" + "~" * (column_size - 1)).yellow
else
stdout.puts "#{Rainbow(issue.path).cyan}:-:-: #{message}"
end