From bf3df26efdc1b4d26d4b12859dd002dadd083136 Mon Sep 17 00:00:00 2001 From: Benjamin Elder Date: Thu, 20 Oct 2022 15:36:49 -0700 Subject: [PATCH] disable SC2120 on functions with optional parameters https://www.shellcheck.net/wiki/SC2120#exceptions --- build/common.sh | 1 + hack/lib/util.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/build/common.sh b/build/common.sh index 4080946358c..dd7ee878cae 100755 --- a/build/common.sh +++ b/build/common.sh @@ -150,6 +150,7 @@ kube::build::get_docker_wrapped_binaries() { # KUBE_RSYNC_CONTAINER_NAME # DOCKER_MOUNT_ARGS # LOCAL_OUTPUT_BUILD_CONTEXT +# shellcheck disable=SC2120 # optional parameters function kube::build::verify_prereqs() { local -r require_docker=${1:-true} kube::log::status "Verifying Prerequisites...." diff --git a/hack/lib/util.sh b/hack/lib/util.sh index 02cf4e3aa7d..099a8d38153 100755 --- a/hack/lib/util.sh +++ b/hack/lib/util.sh @@ -656,6 +656,7 @@ function kube::util::join { # CFSSL_BIN: The path of the installed cfssl binary # CFSSLJSON_BIN: The path of the installed cfssljson binary # +# shellcheck disable=SC2120 # optional parameters function kube::util::ensure-cfssl { if command -v cfssl &>/dev/null && command -v cfssljson &>/dev/null; then CFSSL_BIN=$(command -v cfssl)