Class: RosettAi::Comply::Runner
- Inherits:
-
Object
- Object
- RosettAi::Comply::Runner
- Defined in:
- lib/rosett_ai/comply/runner.rb
Overview
Orchestrates compliance checks across all registered checkers.
Supports selective execution via check type filters (--cra, --license, --headers) and aggregates results for the Reporter.
Constant Summary collapse
- CHECKER_MAP =
{ cra: Checkers::CraChecker, license: Checkers::LicenseChecker, headers: Checkers::SpdxHeaderChecker }.freeze
Instance Method Summary collapse
-
#initialize(project_root:, checks: nil) ⇒ Runner
constructor
A new instance of Runner.
-
#run ⇒ Array<Hash>
Runs all applicable compliance checks.
Constructor Details
#initialize(project_root:, checks: nil) ⇒ Runner
Returns a new instance of Runner.
24 25 26 27 |
# File 'lib/rosett_ai/comply/runner.rb', line 24 def initialize(project_root:, checks: nil) @project_root = project_root @checks = checks end |
Instance Method Details
#run ⇒ Array<Hash>
Runs all applicable compliance checks.
32 33 34 35 36 37 |
# File 'lib/rosett_ai/comply/runner.rb', line 32 def run active_checkers.flat_map do |checker_class| checker = checker_class.new(project_root: @project_root) checker.check end end |