瀏覽代碼

Update validate-lint to lint all go files

By default, using go with package will only validate the go file for the
current platform (or at last misses file_windows.go for example). This
tries to fix that.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Vincent Demeester 10 年之前
父節點
當前提交
fa34f07ec0
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      hack/make/validate-lint

+ 3 - 1
hack/make/validate-lint

@@ -41,7 +41,9 @@ packages=(
 
 errors=()
 for p in "${packages[@]}"; do
-	failedLint=$(golint "$p")
+	# Run golint on package/*.go file explicitly to validate all go files
+	# and not just the ones for the current platform.
+	failedLint=$(golint "$p"/*.go)
 	if [ "$failedLint" ]; then
 		errors+=( "$failedLint" )
 	fi