Skip to content

Commit 2dc3509

Browse files
authored
Merge pull request kubernetes#76867 from xichengliudui/fixshellcheckfailures-29
fix shellcheck failures on vet.sh
2 parents c88b7cd + a4a4abd commit 2dc3509

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

hack/.shellcheck_failures

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
./hack/make-rules/test.sh
2828
./hack/make-rules/update.sh
2929
./hack/make-rules/verify.sh
30-
./hack/make-rules/vet.sh
3130
./hack/pin-dependency.sh
3231
./hack/test-integration.sh
3332
./hack/update-vendor.sh

hack/make-rules/vet.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ set -o errexit
1818
set -o nounset
1919
set -o pipefail
2020

21-
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
21+
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../..
2222
source "${KUBE_ROOT}/hack/lib/init.sh"
2323

2424
cd "${KUBE_ROOT}"
@@ -47,7 +47,9 @@ done
4747

4848
if [[ ${#targets[@]} -eq 0 ]]; then
4949
# Do not run on third_party directories or generated client code or build tools.
50-
targets=$(go list -e ./... | egrep -v "/(build|third_party|vendor|staging|clientset_generated)/")
50+
while IFS='' read -r line; do
51+
targets+=("${line}")
52+
done < <(go list -e ./... | grep -E -v "/(build|third_party|vendor|staging|clientset_generated)/")
5153
fi
5254

53-
go vet "${goflags[@]:+${goflags[@]}}" ${targets[@]}
55+
go vet "${goflags[@]:+${goflags[@]}}" "${targets[@]}"

0 commit comments

Comments
 (0)