lib/quality/command_output_processor.rb in quality-27.3.1 vs lib/quality/command_output_processor.rb in quality-27.4.0

- old
+ new

@@ -26,23 +26,25 @@ out += process_line(&count_violations_on_line) end out end + def processed_output + if emacs_format + preprocess_line_for_emacs + else + @current_line + end + end + def process_line(&block) - output = - if emacs_format - preprocess_line_for_emacs - else - @current_line - end @found_output = true @violations += if block yield @current_line else 1 end - output + processed_output end def preprocess_line_for_emacs if @current_line =~ /^ *(\S*.rb:[0-9]*) *(.*)/ Regexp.last_match[1] + ': ' + Regexp.last_match[2] + "\n"