Skip to content

Format Rootform files.

Usage

rootform fmt [path] [options]
SHELL

Options

FlagTypeDefaultDescription
--checkboolfalsecheck formatting without rewriting files
--diffboolfalseshow formatting changes without rewriting files

Global options

FlagTypeDefaultDescription
-h, --helpboolfalseshow how to use rootform fmt
--colormodeautocolor human output: auto|always|never; default: auto
--no-pagerboolfalseprint a long report in full instead of opening it in less

Behavior

Rewrite Rootform source files using the canonical format.

Without a path, fmt reads the current directory. By default it rewrites changed files. --check reports their names and --diff writes changes to standard output without rewriting. Diagnostics go to standard error.

Exit status

StatusDescription
0the sources are formatted
1a source cannot be parsed, or --check or --diff found a source that is not formatted
2the command was used incorrectly
4a source could not be read or rewritten

Examples

rootform fmt
rootform fmt ./dialects
rootform fmt --check
rootform fmt ./dialects --diff
Shell