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:
parent
f8561de857
commit
2c9302b699
@ -123,8 +123,8 @@ func processFile(fn string, in *os.File) error {
|
|||||||
diagWr.WriteDiagnostics(diags)
|
diagWr.WriteDiagnostics(diags)
|
||||||
if diags.HasErrors() {
|
if diags.HasErrors() {
|
||||||
checkErrs = true
|
checkErrs = true
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
outSrc := zclwrite.Format(inSrc)
|
outSrc := zclwrite.Format(inSrc)
|
||||||
|
Loading…
Reference in New Issue
Block a user