commit hook was inaccuratly reporting vet errors due to how we ran vet
parent
6309e0e6e9
commit
fd236a7737
|
@ -6,8 +6,7 @@ if [ $fmtcount -gt 0 ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
GOTOOLDIR=$(go env GOTOOLDIR)
|
||||
vetcount=`git ls-files | grep '.go$' | xargs $GOTOOLDIR/vet 2>&1 | wc -l`
|
||||
vetcount=`go vet ./... 2>&1 | wc -l`
|
||||
if [ $vetcount -gt 0 ]; then
|
||||
echo "Some files aren't passing vet heuristics, please run 'go vet ./...' to see the errors it flags and correct your source code before committing"
|
||||
exit 1
|
||||
|
|
Loading…
Reference in New Issue