Module: Testdiff::Rubocop

Defined in:
lib/testdiff/rubocop.rb

Overview

Runs Rubocop on modified files

Class Method Summary collapse

Class Method Details

.runObject



8
9
10
11
12
13
14
15
16
# File 'lib/testdiff/rubocop.rb', line 8

def run
  puts 'Running Rubocop on modified files...'
  files = Testdiff::Modified::RubyFiles.find
  if files.any?
    system "rubocop #{files.join(' ')}"
  else
    puts 'No modified Ruby files.'
  end
end