Commit 22a5bf9
committed
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 ]]
```1 parent b1979b6 commit 22a5bf9
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
0 commit comments