Class: Spektr::Cli
Instance Method Summary collapse
Instance Method Details
#scan ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/spektr/cli.rb', line 45 def scan if params[:help] print help exit else ignore = params[:ignore] ? params[:ignore].split(',') : [] report = Spektr.run(params[:root], params[:output_format], params[:debug], params[:check], ignore) case params[:output_format] when 'json' puts JSON.pretty_generate report exit 1 if report[:advisories].any? end end end |