Skip to content

Commit c6ae694

Browse files
committed
fix some shellcheck failures in hack
1 parent 5a2d587 commit c6ae694

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

hack/.shellcheck_failures

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
./hack/lib/test.sh
4545
./hack/lib/util.sh
4646
./hack/lib/version.sh
47-
./hack/list-feature-tests.sh
4847
./hack/local-up-cluster.sh
4948
./hack/make-rules/build.sh
5049
./hack/make-rules/clean.sh
@@ -77,12 +76,10 @@
7776
./hack/verify-codegen.sh
7877
./hack/verify-description.sh
7978
./hack/verify-golint.sh
80-
./hack/verify-govet.sh
8179
./hack/verify-import-boss.sh
8280
./hack/verify-no-vendor-cycles.sh
8381
./hack/verify-openapi-spec.sh
8482
./hack/verify-readonly-packages.sh
85-
./hack/verify-staging-meta-files.sh
8683
./hack/verify-test-featuregates.sh
8784
./test/cmd/apply.sh
8885
./test/cmd/apps.sh

hack/list-feature-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ set -o errexit
1919
set -o nounset
2020
set -o pipefail
2121

22-
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
22+
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
2323
grep "\[Feature:\w+\]" "${KUBE_ROOT}"/test/e2e/**/*.go -Eoh | LC_ALL=C sort -u

hack/verify-govet.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,19 @@ set -o errexit
2020
set -o nounset
2121
set -o pipefail
2222

23-
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
23+
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
2424

2525
# For help output
2626
ARGHELP=""
2727
if [[ "$#" -gt 0 ]]; then
28-
ARGHELP="WHAT='$@'"
28+
ARGHELP="WHAT='$*'"
2929
fi
3030

31-
make --no-print-directory -C "${KUBE_ROOT}" vet WHAT="$@"
31+
echo "NOTE: $0 has been replaced by 'make vet'"
32+
echo
33+
echo "The equivalent of this invocation is: "
34+
echo " make vet ${ARGHELP}"
35+
echo
36+
echo
37+
38+
make --no-print-directory -C "${KUBE_ROOT}" vet WHAT="$*"

hack/verify-staging-meta-files.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ 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

23-
staging_repos=($(ls "${KUBE_ROOT}/staging/src/k8s.io/"))
23+
IFS=" " read -r -a staging_repos <<< "$(ls "${KUBE_ROOT}/staging/src/k8s.io/")"
2424

2525
expected_filenames=(
2626
.github/PULL_REQUEST_TEMPLATE.md
@@ -36,8 +36,8 @@ exceptions=(
3636
)
3737

3838
RESULT=0
39-
for repo in ${staging_repos[@]}; do
40-
for filename in ${expected_filenames[@]}; do
39+
for repo in "${staging_repos[@]}"; do
40+
for filename in "${expected_filenames[@]}"; do
4141
if echo " ${exceptions[*]} " | grep -F " ${repo}/${filename} " >/dev/null; then
4242
continue
4343
elif [ ! -f "${KUBE_ROOT}/staging/src/k8s.io/${repo}/${filename}" ]; then

0 commit comments

Comments
 (0)