Expand description
The skif command line as a library: a thin consumer of the skif library.
It is the only code that reads the environment, prints, prompts, writes files and spawns a process; run
returns an exit code and no function below calls std::process::exit, except the panic hook that
install_panic_hook puts in place for the skif binary. The binary and the npm addon both call run.
Structs§
- CliError
- A failure that stops skif from checking the repository.
Enums§
- Kind
- Machine-readable category of a failure.
Functions§
- install_
panic_ hook - Keeps the JSON contract when skif itself panics: in
--format jsonmode stdout still receives exactly oneerrordocument (kindinternal) and the process exits 2, instead of aborting with a bare message on stderr. - lint_
to_ json - Lints the workspace containing
path, or withrecursiveevery root at or below it, and returns the report as the JSON document--format jsonprints. - run
- Runs the CLI with
args(the first item is the program name, as instd::env::args_os) and returns the exit code. Both theskifbinary and the npm addon call this, so their behaviour cannot drift.