Class: LintTrappings::Command::Scan
- Defined in:
- lib/lint_trappings/command/scan.rb
Overview
Scan for lints, outputting report of results using the specified formatter.
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from LintTrappings::Command::Base
Instance Method Details
#run ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/lint_trappings/command/scan.rb', line 4 def run LintTrappings::LinterLoader.new(application, config).load() runner = LintTrappings::Runner.new(application, config, output) report = runner.run() if report.failures? raise LintTrappings::ScanFailed, 'High severity lints were reported!' elsif report.warnings? raise LintTrappings::ScanWarned, 'Warnings were reported.' end end |