Class: Phare::Check::Rubocop

Inherits:
Phare::Check show all
Defined in:
lib/phare/check/rubocop.rb

Instance Attribute Summary

Attributes inherited from Phare::Check

#status, #tree

Instance Method Summary collapse

Methods inherited from Phare::Check

#run, #should_run?

Constructor Details

#initialize(directory, options = {}) ⇒ Rubocop

Returns a new instance of Rubocop.



5
6
7
8
9
10
11
# File 'lib/phare/check/rubocop.rb', line 5

def initialize(directory, options = {})
  @path = directory
  @extensions = %w(.rb)
  @options = options

  super
end

Instance Method Details

#commandObject



13
14
15
16
17
18
19
# File 'lib/phare/check/rubocop.rb', line 13

def command
  if @tree.changed?
    "rubocop #{files_to_check.join(' ')}"
  else
    'rubocop'
  end
end