Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Commit

Permalink
cmd: added file path output before errors
Browse files Browse the repository at this point in the history
  • Loading branch information
i582 committed Jul 31, 2021
1 parent 44bbff6 commit 85b5d3e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/php-parser/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 85b5d3e

Please sign in to comment.