diff --git a/cmd/php-parser/main.go b/cmd/php-parser/main.go index e64a883..db931ff 100644 --- a/cmd/php-parser/main.go +++ b/cmd/php-parser/main.go @@ -168,10 +168,12 @@ func printerWorker(r <-chan result) { _, _ = io.WriteString(os.Stderr, "==> ["+strconv.Itoa(counter)+"] "+res.path+"\n") } - if *printErrors { + if *printErrors && len(res.errors) > 0 { + _, _ = io.WriteString(os.Stderr, "==> ["+strconv.Itoa(counter)+"] "+res.path+"\n") for _, e := range res.errors { _, _ = io.WriteString(os.Stderr, "==> "+e.String()+"\n") } + _, _ = io.WriteString(os.Stderr, "\n") } if *printBack {