lib/rordan_gramsay/lint/rubocop.rb
def call
        @file_list.each do |file|
          result = if file.rules.empty?
                     Paint['Passed', :green, :bold]
                   elsif file.failed?
                     Paint['Failed', :red, :bold]
                   else
                     # Passes with warnings
                     Paint['Passed', :yellow, :bold]
                   end

          $stdout.puts Paint % ['  %{filename} : %{result}', filename: Paint[nice_filename(file.name), :white, :bold], result: result]

          # Print warnings/failures
          file.rules.each do |line, ruleset|
            line_msg = Paint[line, :white]
            rule_msg = ruleset.map { |r| Paint[r.code, :yellow] }.join(', ')
            msg = Paint % ['    Line %{line} violates %{ruleset}', line: line_msg, ruleset: rule_msg]

            $stdout.puts msg
          end
        end
      end
# Outputs the results of RuboCop linting by filename
#
#   <space x2><filename> : <result>
#   <space x4><line num>: <rule codes>
#
Outputs the results of RuboCop linting by filename
 : 
: 
Outputs the results of RuboCop linting by filename : :
def call
        @file_list.each do |file|
          result = if file.rules.empty?
                     Paint['Passed', :green, :bold]
                   elsif file.failed?
                     Paint['Failed', :red, :bold]
                   else
                     Paint['Passed', :yellow, :bold]
                   end
          $stdout.puts Paint % ['  %{filename} : %{result}', filename: Paint[nice_filename(file.name), :white, :bold], result: result]
          file.rules.each do |line, ruleset|
            line_msg = Paint[line, :white]
            rule_msg = ruleset.map { |r| Paint[r.code, :yellow] }.join(', ')
            msg = Paint % ['    Line %{line} violates %{ruleset}', line: line_msg, ruleset: rule_msg]
            $stdout.puts msg
          end
        end
      end
def call @file_list . each do | file | result = if file . rules . empty? Paint [ 'Passed' , :green , :bold ] elsif file . failed? Paint [ 'Failed' , :red , :bold ] else Paint [ 'Passed' , :yellow , :bold ] end $stdout . puts Paint % [ '  %{filename} : %{result}' , filename : Paint [ nice_filename ( file . name ) , :white , :bold ] , result : result ] file . rules . each do | line , ruleset | line_msg = Paint [ line , :white ] rule_msg = ruleset . map { | r | Paint [ r . code , :yellow ] } . join ( ', ' ) msg = Paint % [ '    Line %{line} violates %{ruleset}' , line : line_msg , ruleset : rule_msg ] $stdout . puts msg end end end
Outputs the results of RuboCop linting by filename
<space x2><filename> : <result>
<space x4><line num>: <rule codes>
Outputs the results of RuboCop linting by filename <space x2 > <filename > : <result > <space x4 > <line num > : <rule codes >
# Passes with warnings # Print warnings/failures