pub fn run()Expand description
Parse std::env::args_os() and execute the selected bca
subcommand. Intended to be called from the bca binary’s main,
which is a one-liner over this function.
§Termination contract
This function may terminate the calling process rather than return. It is not a re-entrant library entry point:
- clap argument-parsing failures bubble up through
clap::Error::exit(exit 0 on--help/--version, exit 2 on usage errors). - User-input errors (invalid threshold spec, unreadable preproc
data, missing
--outputparent directory, walk errors, mutually exclusive output-format combinations, broken-pipe writes, etc.) callprocess::exit(1)via internaldie/die_iohelpers. - The
checksubcommand callsprocess::exit(2)when any threshold is exceeded, reserving exit 1 for tool errors so CI can distinguish “metric regression” from “tool crashed”.
Hosts that call run will be torn down on any of those paths
without unwinding. If you need to drive the same functionality from
inside another process, use the big_code_analysis library crate
directly instead of going through this entry point.