Browse Source

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

Xiang Li 9 years ago
parent
commit
7f569a163c
1 changed files with 3 additions and 0 deletions
  1. 3 0
      test

+ 3 - 0
test

@@ -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}"