website: Correct fmt -check (#21631)
* Correct fmt -check With `-check=false` the exit status is always zero. With `-check=true` the exit status is zero when all files are properly formatted and non-zero otherwise. * update fmt documentation to use short form for -diff and -check
This commit is contained in:
parent
3bc14620c0
commit
bfd9b552cc
|
@ -33,9 +33,8 @@ input (STDIN).
|
||||||
|
|
||||||
The command-line flags are all optional. The list of available flags are:
|
The command-line flags are all optional. The list of available flags are:
|
||||||
|
|
||||||
* `-list=true` - List files whose formatting differs (disabled if using STDIN)
|
* `-list=false` - Don't list the files containing formatting inconsistencies.
|
||||||
* `-write=true` - Write result to source file instead of STDOUT (disabled if
|
* `-write=false` - Don't overwrite the input files. (This is implied by `-check` or when the input is STDIN.)
|
||||||
using STDIN or -check)
|
* `-diff` - Display diffs of formatting changes
|
||||||
* `-diff=false` - Display diffs of formatting changes
|
* `-check` - Check if the input is formatted. Exit status will be 0 if
|
||||||
* `-check=false` - Check if the input is formatted. Exit status will be 0 if
|
|
||||||
all input is properly formatted and non-zero otherwise.
|
all input is properly formatted and non-zero otherwise.
|
||||||
|
|
Loading…
Reference in New Issue