Class: Rigor::CLI::TypeScanCommand
- Defined in:
- lib/rigor/cli/type_scan_command.rb
Overview
Executes the ‘rigor type-scan` command.
The command walks every Prism node in one or more files, runs ‘Rigor::Scope#type_of` on each, and reports per-node-class coverage of the inference engine’s directly recognized classes. It is the project’s primary CI gate for tracking how much of an input source the engine can name without falling back to ‘Dynamic`.
Defined Under Namespace
Classes: LocatedEvent, ScanAccumulator
Constant Summary collapse
- USAGE =
"Usage: rigor type-scan [options] PATH..."
Instance Method Summary collapse
-
#run ⇒ Integer
CLI exit status.
Methods inherited from Command
Constructor Details
This class inherits a constructor from Rigor::CLI::Command
Instance Method Details
#run ⇒ Integer
Returns CLI exit status.
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/rigor/cli/type_scan_command.rb', line 29 def run = paths = collect_paths(@argv, command_name: "type-scan") return CLI::EXIT_USAGE if paths.nil? return usage_error if paths.empty? report = scan_paths(paths, ) TypeScanRenderer.new(out: @out).render(report, format: .fetch(:format)) determine_exit(report, ) end |