Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vet: fix option order when invoking grep
vet.sh is currently calling `grep -ev expr`. This is being interpreted as "grep pattern 'v' in file 'expr'", instead of the intended "invert grep for pattern 'expr' in standard input". As a result: - Most likely we see a line as follows on standard output: ``` + noret_grep '(SA4000)' /tmp/tmp.xKUnikWsnw + grep '(SA4000)' /tmp/tmp.xKUnikWsnw + not grep -ev 'crl.go:\d*:\d*: identical expressions on the left and right side of the '\''||'\'' operator (SA4000)' + grep -ev 'crl.go:\d*:\d*: identical expressions on the left and right side of the '\''||'\'' operator (SA4000)' + [[ 1 == 1 ]] grep: crl.go:\d*:\d*: identical expressions on the left and right side of the '||' operator (SA4000): No such file or directory ``` and the process continues without error, but doesn't do what we want it to do. - Occasionally, this causes a broken pipe on the first grep which results in an error: ``` + noret_grep '(SA4000)' /tmp/tmp.BmSCFYnqgE + grep '(SA4000)' /tmp/tmp.BmSCFYnqgE + not grep -ev 'crl.go:\d*:\d*: identical expressions on the left and right side of the '\''||'\'' operator (SA4000)' + grep -ev 'crl.go:\d*:\d*: identical expressions on the left and right side of the '\''||'\'' operator (SA4000)' grep: crl.go:\d*:\d*: identical expressions on the left and right side of the '||' operator (SA4000): No such file or directory grep: write error: Broken pipe + [[ 2 == 1 ]] ```
- Loading branch information