Formatting
jacket fmt runs jaifmt on the project with its [format] settings; its flags are those of jaifmt. Format rules shows what each setting does.
Formats Jai source files in place. Directories are searched recursively for *.jai files.
Exit status: 0 success, 1 files would change (--check), 2 errors. With --is-ignored: 0 the file is ignored by the config's ignore list, 1 it is formatted, 2 errors.
jaifmt [OPTIONS] [PATHS]...
Arguments
| Argument | Meaning |
|---|---|
[PATHS]... | Files or directories to format |
Options
| Option | Meaning |
|---|---|
--[no-]check | Do not write; list the files that would change and exit with 1 |
--[no-]stdin | Format standard input to standard output |
--range <START:END> | With --stdin: format only the top-level statements the byte range START:END touches and copy the rest unchanged |
--config <FILE> | Use this jacket.toml instead of the nearest one |
--is-ignored <FILE> | Print nothing; exit 0 when FILE is ignored by the nearest config's ignore list, 1 when it is not (for editors) |
--set <KEY=VALUE> | Set one [format] key, written as in jacket.toml (--set indent_width=2); implies --no-config. jacket fmt passes every resolved setting this way |
--[no-]no-config | Read no jacket.toml: start from the defaults, then --config and --set. Nothing is ignored, since the caller chooses the files |
-v, --[no-]verbose | Report every file, a summary, and lines over max_width |
--color <COLOR> | Colour errors; auto means on a terminal, unless NO_COLOR is set [possible values: auto, always, never] |
-h, --help | Print help |
-V, --version | Print version |