From bfd9b552cceb0f904b9dbfb5a897ee7a5c708d50 Mon Sep 17 00:00:00 2001 From: john-auld <43154541+john-auld@users.noreply.github.com> Date: Tue, 18 Jun 2019 22:36:45 +0100 Subject: [PATCH] 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 --- website/docs/commands/fmt.html.markdown | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/website/docs/commands/fmt.html.markdown b/website/docs/commands/fmt.html.markdown index 417f1648b..b1ee2945f 100644 --- a/website/docs/commands/fmt.html.markdown +++ b/website/docs/commands/fmt.html.markdown @@ -33,9 +33,8 @@ input (STDIN). The command-line flags are all optional. The list of available flags are: -* `-list=true` - List files whose formatting differs (disabled if using STDIN) -* `-write=true` - Write result to source file instead of STDOUT (disabled if - using STDIN or -check) -* `-diff=false` - Display diffs of formatting changes -* `-check=false` - Check if the input is formatted. Exit status will be 0 if +* `-list=false` - Don't list the files containing formatting inconsistencies. +* `-write=false` - Don't overwrite the input files. (This is implied by `-check` or when the input is STDIN.) +* `-diff` - Display diffs of formatting changes +* `-check` - Check if the input is formatted. Exit status will be 0 if all input is properly formatted and non-zero otherwise.