cmd/cue: add a fmt --check flag to list badly formatted files
Adds a --check flag that will cause cue to fail with exit code 1
in case any files require formatting. A list of non formatted files
will be displayed, line by line, to stdout.
Also, a typo is fixed in cue/ast/ast.go.
fixes #363.
Change-Id: I27c8e9b18bb01f981cd061a23ee3323bc403c9a9
Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1189314
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: CUEcueckoo <cueckoo@gmail.com>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
authored by