Class: Rigor::CLI::TypeScanCommand
- Defined in:
- lib/rigor/cli/type_scan_command.rb,
sig/rigor.rbs
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[Top].
Defined Under Namespace
Classes: LocatedEvent, ScanAccumulator
Constant Summary collapse
- USAGE =
"Usage: rigor type-scan [options] PATH..."
Instance Method Summary collapse
-
#initialize ⇒ TypeScanCommand
constructor
A new instance of TypeScanCommand.
-
#run ⇒ Integer
CLI exit status.
Constructor Details
#initialize ⇒ TypeScanCommand
Returns a new instance of TypeScanCommand.
39 |
# File 'sig/rigor.rbs', line 39
def initialize: (argv: Array[String], out: untyped, err: untyped) -> void
|
Instance Method Details
#run ⇒ Integer
Returns CLI exit status.
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/rigor/cli/type_scan_command.rb', line 28 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 |