Bump shellcheck to v0.7.0

Changelog:
https://github.com/koalaman/shellcheck/blob/master/CHANGELOG.md

We have some new erros due to the version bump.

- SC2034: VARIABLE_XYZ appears unused. Verify use (or export if used externally).
    - Applies to all scripts we source in other scripts
- SC2039: In POSIX sh, set option pipefail is undefined.
    - Applies to files using it with "sh" instead of "bash" in the shebang
- SC2054: Use spaces, not commas, to separate array elements.
    - Fixing Should make no difference in the code
- SC2128: Expanding an array without an index only gives the first element.
    - Fixing Should make no difference in the code
- SC2251: This ! is not on a condition and skips errexit. Use `&& exit 1` instead, or make sure $? is checked.
    - Not 100% sure if we can swap to `&& exit 1`. Applies to a lot of
    test code.

All changes should be straight forward to fix, but will be done in a
separate PR.
This commit is contained in:
Odin Ugedal 2019-10-23 19:55:44 +02:00
parent b5a2abfda7
commit 65a66b9d7f
No known key found for this signature in database
GPG Key ID: AFF9C8242CF7A7AF
2 changed files with 16 additions and 3 deletions

View File

@ -1,3 +1,4 @@
./build/common.sh
./build/lib/release.sh ./build/lib/release.sh
./cluster/common.sh ./cluster/common.sh
./cluster/gce/config-default.sh ./cluster/gce/config-default.sh
@ -6,7 +7,19 @@
./cluster/gce/gci/configure.sh ./cluster/gce/gci/configure.sh
./cluster/gce/gci/health-monitor.sh ./cluster/gce/gci/health-monitor.sh
./cluster/gce/gci/master-helper.sh ./cluster/gce/gci/master-helper.sh
./cluster/gce/gci/mounter/stage-upload.sh
./cluster/gce/upgrade.sh ./cluster/gce/upgrade.sh
./cluster/gce/util.sh ./cluster/gce/util.sh
./cluster/log-dump/log-dump.sh ./cluster/log-dump/log-dump.sh
./cluster/pre-existing/util.sh ./cluster/pre-existing/util.sh
./hack/lib/golang.sh
./hack/lib/test.sh
./test/cmd/apply.sh
./test/cmd/apps.sh
./test/cmd/core.sh
./test/cmd/crd.sh
./test/cmd/create.sh
./test/cmd/generic-resources.sh
./test/cmd/save-config.sh
./test/images/pets/redis-installer/on-start.sh
./test/images/pets/zookeeper-installer/on-start.sh

View File

@ -24,9 +24,9 @@ source "${KUBE_ROOT}/hack/lib/util.sh"
# required version for this script, if not installed on the host we will # required version for this script, if not installed on the host we will
# use the official docker image instead. keep this in sync with SHELLCHECK_IMAGE # use the official docker image instead. keep this in sync with SHELLCHECK_IMAGE
SHELLCHECK_VERSION="0.6.0" SHELLCHECK_VERSION="0.7.0"
# upstream shellcheck latest stable image as of January 10th, 2019 # upstream shellcheck latest stable image as of October 23rd, 2019
SHELLCHECK_IMAGE="koalaman/shellcheck-alpine:v0.6.0@sha256:7d4d712a2686da99d37580b4e2f45eb658b74e4b01caf67c1099adc294b96b52" SHELLCHECK_IMAGE="koalaman/shellcheck-alpine:v0.7.0@sha256:24bbf52aae6eaa27accc9f61de32d30a1498555e6ef452966d0702ff06f38ecb"
# fixed name for the shellcheck docker container so we can reliably clean it up # fixed name for the shellcheck docker container so we can reliably clean it up
SHELLCHECK_CONTAINER="k8s-shellcheck" SHELLCHECK_CONTAINER="k8s-shellcheck"