Merge pull request #76867 from xichengliudui/fixshellcheckfailures-29

fix shellcheck failures on vet.sh
k3s-v1.15.3
Kubernetes Prow Robot 2019-04-27 16:48:21 -07:00 committed by GitHub
commit 2dc3509b6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -27,7 +27,6 @@
./hack/make-rules/test.sh
./hack/make-rules/update.sh
./hack/make-rules/verify.sh
./hack/make-rules/vet.sh
./hack/pin-dependency.sh
./hack/test-integration.sh
./hack/update-vendor.sh

View File

@ -18,7 +18,7 @@ set -o errexit
set -o nounset
set -o pipefail
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../..
source "${KUBE_ROOT}/hack/lib/init.sh"
cd "${KUBE_ROOT}"
@ -47,7 +47,9 @@ done
if [[ ${#targets[@]} -eq 0 ]]; then
# Do not run on third_party directories or generated client code or build tools.
targets=$(go list -e ./... | egrep -v "/(build|third_party|vendor|staging|clientset_generated)/")
while IFS='' read -r line; do
targets+=("${line}")
done < <(go list -e ./... | grep -E -v "/(build|third_party|vendor|staging|clientset_generated)/")
fi
go vet "${goflags[@]:+${goflags[@]}}" ${targets[@]}
go vet "${goflags[@]:+${goflags[@]}}" "${targets[@]}"