Class: CC::CLI::Analyze
- Includes:
- Analyzer
- Defined in:
- lib/cc/cli/analyze.rb
Constant Summary
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.
8 9 10 11 12 |
# File 'lib/cc/cli/analyze.rb', line 8 def initialize(args = []) super process_args end |
Instance Method Details
#run ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/cc/cli/analyze.rb', line 14 def run require_codeclimate_yml if engines.empty? fatal("No engines enabled. Add some to your .codeclimate.yml file!") end formatter.started engines.each do |engine| formatter.engine_running(engine) do engine.run(formatter) end end formatter.finished end |