Class: RuboCop::Gradual::Commands::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/rubocop/gradual/commands/base.rb

Overview

Base command runs RuboCop, and processes the results with Gradual.

Instance Method Summary collapse

Instance Method Details

#callObject



13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/rubocop/gradual/commands/base.rb', line 13

def call
  exit_code = 0
  run_rubocop
  write_stats_message
  time = Benchmark.realtime { exit_code = Process.new(Configuration.rubocop_results).call }
  puts "Finished Gradual processing in #{time} seconds" if Configuration.display_time?

  exit_code
rescue RuboCop::Error => e
  warn "\nRuboCop Error: #{e.message}"
  1
end

#lint_pathsObject



26
27
28
# File 'lib/rubocop/gradual/commands/base.rb', line 26

def lint_paths
  Configuration.target_file_paths
end