class Lintrunner::Runner::Repo

Public Instance Methods

run(reporter = nil) click to toggle source
# File lib/lintrunner/runner/repo.rb, line 5
def run(reporter = nil)
  warnings = []
  files.each do |filename|
    # next if patch.delta.binary?
    full_path = File.join(path, filename)
    next unless filename =~ match

    messages = executor.execute(full_path, filename: filename)
    warnings.concat messages
    output = messages.collect do |message|
      reporter.report(message)
    end
  end
  warnings
end

Private Instance Methods

files() click to toggle source
# File lib/lintrunner/runner/repo.rb, line 23
def files
  files = []
  git.head.target.tree.walk_blobs { |root, entry| files << "#{root}#{entry[:name]}" }
  files
end