Class: HamlLint::Runner
- Inherits:
-
Object
- Object
- HamlLint::Runner
- Defined in:
- lib/haml_lint/runner.rb
Overview
Responsible for running the applicable linters against the desired files.
Instance Method Summary collapse
-
#run(options = {}) ⇒ HamlLint::Report
Runs the appropriate linters against the desired files given the specified options.
Instance Method Details
#run(options = {}) ⇒ HamlLint::Report
Runs the appropriate linters against the desired files given the specified options.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/haml_lint/runner.rb', line 14 def run( = {}) config = load_applicable_config() files = extract_applicable_files(config, ) linter_selector = HamlLint::LinterSelector.new(config, ) lints = files.map do |file| collect_lints(file, linter_selector, config) end.flatten HamlLint::Report.new(lints, files) end |