Class: Lintrunner::Runner::ChangedFile
- Defined in:
- lib/lintrunner/runner/changed_file.rb
Instance Attribute Summary
Attributes inherited from Base
#executor, #git, #match, #path
Instance Method Summary collapse
Methods inherited from Base
Methods included from GitHelpers
#git_changeset, #git_common_ancestor
Constructor Details
This class inherits a constructor from Lintrunner::Runner::Base
Instance Method Details
#run(reporter) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/lintrunner/runner/changed_file.rb', line 5 def run(reporter) warnings = [] git_changeset.each do |patch| filename = patch.delta.new_file[:path] next if patch.delta.binary? next unless filename =~ match full_path = File.join(path, filename) = executor.execute(full_path, filename: filename) warnings.concat output = .collect do || reporter.report() end end warnings end |