verdict fmt
Format policy files, check formatting, or write formatted files.
Runs locally. Effects: format output or write files.
Arguments and flags
Section titled “Arguments and flags”| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
--write (-w) | boolean | no | false | Format files in place |
--check | boolean | no | false | Exit non-zero if any file would change (for CI) |
<files> | positional | no | No parser default | Files to format (reads stdin if none given) |
--help (-h) shows command help without executing the command. Boolean flags support --no-<flag>. Defaults stated in descriptions may be resolved by the handler or configuration rather than the argument parser.
File paths, or stdin when no files are supplied. With stdin, —check and —write are ignored and formatted source is printed.
File input: supported. Standard input: supported. The files positional accepts additional terms or paths.
Result
Section titled “Result”{ "kind": "source", "description": "Default: policy source. --write: acknowledgements for changed files. --check: stderr diagnostics for changed files, no stdout."}Standard output: Default: policy source. —write: acknowledgements for changed files. —check: stderr diagnostics for changed files, no stdout.
Lifecycle: Completes after formatting the supplied input.
Exit status
Section titled “Exit status”- 0: input was formatted, or all checked files already matched. With no file paths, stdin is formatted regardless of —check or —write.
- 1: —check found a file whose formatting would change.
Argument, I/O, and other failures handled by the CLI runner use status 1.
Examples
Section titled “Examples”verdict fmt policy.vd --checkverdict fmt policy.vd --write