Class: Diffcop::Executor

Inherits:
Object
  • Object
show all
Defined in:
lib/diffcop.rb

Overview

Execute Rubocop to git diff

Instance Method Summary collapse

Instance Method Details

#executeObject



6
7
8
9
10
11
12
13
# File 'lib/diffcop.rb', line 6

def execute
  diff_rb_files = rb_files(diff_files)
  if diff_rb_files == ''
    puts 'No diff from master branch.'
  else
    puts `bundle exec rubocop -a #{diff_rb_files}` if diff_rb_files != ''
  end
end