cmd/zclfmt: skip formatting a file only if it has errors

Previously we were erroneously skipping formatting it whenever check mode
was enabled, regardless of errors.
This commit is contained in:
Martin Atkins 2017-06-24 09:13:48 -07:00
parent f8561de857
commit 2c9302b699

View File

@ -123,8 +123,8 @@ func processFile(fn string, in *os.File) error {
diagWr.WriteDiagnostics(diags)
if diags.HasErrors() {
checkErrs = true
return nil
}
return nil
}
outSrc := zclwrite.Format(inSrc)