lib/quality/command_output_processor.rb in quality-39.0.1 vs lib/quality/command_output_processor.rb in quality-40.0.0

- old
+ new

@@ -42,13 +42,14 @@ end processed_output end def preprocess_line_for_emacs - if @current_line =~ /^ *(\S*.rb:[0-9]*) *(.*)/ - Regexp.last_match[1] + ': ' + Regexp.last_match[2] + "\n" - elsif @current_line =~ /^ *(.*) +(\S*.rb:[0-9]*) *(.*)/ - Regexp.last_match[2] + ': ' + Regexp.last_match[1] + "\n" + case @current_line + when /^ *(\S*.rb:[0-9]*) *(.*)/ + "#{Regexp.last_match[1]}: #{Regexp.last_match[2]}\n" + when /^ *(.*) +(\S*.rb:[0-9]*) *(.*)/ + "#{Regexp.last_match[2]}: #{Regexp.last_match[1]}\n" else @current_line end end end