Class: RuboCop::Git::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/rubocop/git/runner.rb

Overview

Constant Summary collapse

DEFAULT_CONFIG_FILE =
'.rubocop.yml'
HOUND_DEFAULT_CONFIG_FILE =
File.expand_path('../../../../hound.yml', __FILE__)

Instance Method Summary collapse

Instance Method Details

#run(options) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/rubocop/git/runner.rb', line 9

def run(options)
  if options[:hound] && RuboCop::Version.version != '0.22.0'
    warn 'Hound compatibility mode require rubocop 0.22.0'
    exit 1
  end

  @options = options
  @files = parse_diff(git_diff(options[:cached]))

  display_violations($stdout)
end