Home / Docs / Command line
una fmt
Release v0.4.0
Rewrite files in canonical form, or report where they differ from it.
text
una fmt [OPTIONS] [PATH]Examples
sh
una fmt .Rewrite the package's files in canonical form.
sh
una fmt --check .Change nothing: report the files that are not in canonical form.
Arguments
| Argument | What it does | Default |
|---|---|---|
[PATH] |
The package directory, or a single file | . |
Options
| Option | What it does | Default |
|---|---|---|
--check |
Report non-canonical code (U7001) without writing any file | |
--json |
Print machine output as JSON on stdout, and nothing else on stdout | |
--color <WHEN> |
When to use colors in human output. Values: never: Never use colors; auto: Use colors when the output is a terminal; always: Always use colors. |
auto |
Specification
The normative rules, from spec/13 §5:
| Command | Meaning |
|---|---|
una fmt [path] |
Rewrite to canonical form; --check reports U7001 without writing |
Help text
As una fmt --help prints it at v0.4.0:
text
Rewrite files in canonical form, or report where they differ from it
Usage: una fmt [OPTIONS] [PATH]
Arguments:
[PATH]
The package directory, or a single file
[default: .]
Options:
--check
Report non-canonical code (U7001) without writing any file
--json
Print machine output as JSON on stdout, and nothing else on stdout
--color <WHEN>
When to use colors in human output
Possible values:
- never: Never use colors
- auto: Use colors when the output is a terminal
- always: Always use colors
[default: auto]
-h, --help
Print help (see a summary with '-h')