Skip to content

Document or handle passing along exit code #4

@bradleyfalzon

Description

@bradleyfalzon

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions