Expand description
CLI entry point — thin shell over the library crate.
Parses args with clap, validates inputs, delegates to core::analyze().
No business logic lives here.
cli::run<P> is generic over the coverage adapter’s parse-diagnostic
type so the same dispatch shell drives every adapter binary. The
per-binary main.rs supplies the complexity + coverage ports as &dyn
trait objects (ADR D9) plus an AdapterMeta carrying the binary’s
name, version, help copy, extensions, and config-file name.
Structs§
- Adapter
Meta - Adapter-supplied runtime metadata that crap-core threads through
parse_args,run, and the reporter call sites. - Cli
- Display
Args - Filter
Args - Format
Spec - One requested output: a format and an optional file destination.
- Input
Args - Output
Args
Enums§
- Color
Arg - When to colorize output.
- Command
- Top-level subcommands. Optional — when absent, the analyzer runs
the default analysis path that requires
--coverage. - Delta
Kind Arg - Change-kind subset for
--delta-only. - Delta
Sort KeyArg - Sort key for the delta block.
- Format
Arg - Output format for the CRAP report.
- Group
ByArg - Group key for the displayed view.
- Metric
Arg - Complexity metric for CRAP score computation.
- Shell
Arg - Shell name for completion script generation.
- Sort
KeyArg - Sort key for the displayed view.
Functions§
- parse_
args - Parse process args into
Cli, splicing the adapter’s runtime metadata into clap’s help /--versionoutput. - run
- Run the CRAP CLI pipeline end-to-end.