Class: CC::CLI::Analyze
- Includes:
- Analyzer
- Defined in:
- lib/cc/cli/analyze.rb
Constant Summary
Constants included from Analyzer
Constants inherited from Command
Instance Method Summary collapse
-
#initialize(_args = []) ⇒ Analyze
constructor
A new instance of Analyze.
- #run ⇒ Object
Methods inherited from Command
command_name, #execute, #fatal, #require_codeclimate_yml, #say, #warn
Constructor Details
#initialize(_args = []) ⇒ Analyze
Returns a new instance of Analyze.
6 7 8 9 10 11 12 13 |
# File 'lib/cc/cli/analyze.rb', line 6 def initialize(_args = []) super @engine_options = [] @path_options = [] process_args end |
Instance Method Details
#run ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/cc/cli/analyze.rb', line 15 def run require_codeclimate_yml Dir.chdir(ENV['FILESYSTEM_DIR']) do runner = EnginesRunner.new(registry, formatter, source_dir, config, ) runner.run end rescue EnginesRunner::InvalidEngineName => ex fatal(ex.) rescue EnginesRunner::NoEnabledEngines fatal("No enabled engines. Add some to your .codeclimate.yml file!") end |