module
Noir::CLI::Router
Overview
Top-level subcommand router.
noir scan ./app → ScanCommand noir list techs → ListCommand noir cache info → CacheCommand noir config show → ConfigCommand noir rules update → RulesCommand noir completion zsh → CompletionCommand noir version → VersionCommand noir help → HelpCommand
Anything else (including the v0 noir -b ./app pattern) routes to
scan — the default — preserving every CI script, GitHub Action,
Dockerfile entrypoint, and shell alias from v0.x.
Defined in:
cli/router.crConstant Summary
-
GLOBAL_FLAGS =
["--no-color", "--no-spinner"] -
Router-consumed global flags.
apply_global_color_flag!already acted on--no-color, and--no-spinneronly means anything to a scan's loading spinner. Neither is meaningful to the thin subcommands, whose "first positional = action/subject" parsers would otherwise misread a leading--no-coloras the action itself (Unknown cache action: --no-color). They're stripped before those commands parse.scanis deliberately excluded: its own OptionParser re-reads both flags to thread color/spinner state through NoirRunner, so scan keeps the full argv.
Class Method Summary
- .dispatch(argv : Array(String) = ARGV)
-
.strip_global_flags(args : Array(String)) : Array(String)
Pure helper (no exit/die) so the strip rule stays unit-testable.
Class Method Detail
Pure helper (no exit/die) so the strip rule stays unit-testable.