Expand description
clang-format runner used by Cabin’s developer-tools
commands.
This crate keeps formatting-specific executable resolution,
command-line construction, and exit-status handling outside
cabin, mirroring the crate boundaries used by
cabin-tidy.
Crate boundaries:
- the crate owns formatter executable resolution and the
clang-formatcommand-line shape; - it accepts typed inputs (
FormatRequest) and emits typed outcomes (FormatReport); - it never walks the filesystem looking for sources — that
job belongs to
cabin-source-discovery; - it never reads Cabin’s configuration files — the
orchestration layer threads any config-derived inputs
through the typed
FormatRequest.
Structs§
- Format
Request - Input for
run_formatter.
Enums§
- Exit
Status Kind - Exit-status classification, shared with
cabin-tidyso the two external-tool runners report process outcomes the same way. Stringified exit-status kind preserved so the orchestration layer can decide whether to display an exit code or a signal. - Format
Error - Errors surfaced by the runner.
- Format
Mode - Operation mode the runner should perform.
- Format
Report - Per-mode outcome of
run_formatter.
Functions§
- resolve_
formatter_ executable - Resolve the formatter executable Cabin should spawn.
- run_
formatter - Run
clang-formatover the requested files.