-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Labels
Milestone
Description
It maybe beneficial to pass along the exit status of the underly static analysis tool.
See below, the refgrep tool's exit code is 0, whereas go vet was 1. This is normal for grep behaviour, and technically expected, however, refgrep could decide to set its own exit code to 1 if entries match OR just document the use of $PIPESTATUS or set -o pipefail
[bradleyf@srv4 dir (master *)]$ go vet
main.go:5: missing argument for Sprintf("%s"): format reads arg 1, have only 0 args
exit status 1
[bradleyf@srv4 dir (master *)]$ echo $?
1
[bradleyf@srv4 dir (master *)]$ go vet | refgrep
main.go:5: missing argument for Sprintf("%s"): format reads arg 1, have only 0 args
[bradleyf@srv4 dir (master *)]$ echo $?
0