test: go vet should only test the go code in the dir

This commit is contained in:
Xiang Li
2016-06-14 14:36:35 -07:00
parent 252adc0caf
commit 7f569a163c

3
test
View File

@@ -91,6 +91,9 @@ function fmt_tests {
echo "Checking 'go tool vet -shadow'..."
for path in $FMT; do
if [ "${path##*.}" != "go" ]; then
path="${path}/*.go"
fi
vetRes=$(go tool vet -shadow ${path})
if [ -n "${vetRes}" ]; then
echo -e "govet -shadow checking ${path} failed:\n${vetRes}"