diff --git a/components/cli/contrib/completion/bash/docker b/components/cli/contrib/completion/bash/docker index 192cdbf526..92d5740861 100644 --- a/components/cli/contrib/completion/bash/docker +++ b/components/cli/contrib/completion/bash/docker @@ -1,12 +1,14 @@ #!/usr/bin/env bash -# shellcheck disable=SC2016,SC2119,SC2155 +# shellcheck disable=SC2016,SC2119,SC2155,SC2206,SC2207 # # Shellcheck ignore list: # - SC2016: Expressions don't expand in single quotes, use double quotes for that. # - SC2119: Use foo "$@" if function's $1 should mean script's $1. # - SC2155: Declare and assign separately to avoid masking return values. -# -# You can find more details for each warning at the following page: +# - SC2206: Quote to prevent word splitting, or split robustly with mapfile or read -a. +# - SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting). +# +# You can find more details for each warning at the following page: # https://github.com/koalaman/shellcheck/wiki/ # # bash completion file for core docker commands diff --git a/components/cli/dockerfiles/Dockerfile.shellcheck b/components/cli/dockerfiles/Dockerfile.shellcheck index 2507062ee9..dd3cab79b2 100644 --- a/components/cli/dockerfiles/Dockerfile.shellcheck +++ b/components/cli/dockerfiles/Dockerfile.shellcheck @@ -1,7 +1,5 @@ -FROM koalaman/shellcheck-alpine:v0.4.6 +FROM koalaman/shellcheck-alpine:v0.6.0 RUN apk add --no-cache bash make WORKDIR /go/src/github.com/docker/cli ENV DISABLE_WARN_OUTSIDE_CONTAINER=1 -ENTRYPOINT [""] -CMD ["/bin/sh"] COPY . . diff --git a/components/cli/scripts/gen/windows-resources b/components/cli/scripts/gen/windows-resources index 14b45e08e0..5fdc1b4ade 100755 --- a/components/cli/scripts/gen/windows-resources +++ b/components/cli/scripts/gen/windows-resources @@ -7,7 +7,7 @@ set -eu -o pipefail SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # shellcheck source=/go/src/github.com/docker/cli/scripts/build/.variables -source $SCRIPTDIR/../build/.variables +source "$SCRIPTDIR"/../build/.variables RESOURCES=$SCRIPTDIR/../winresources @@ -26,9 +26,9 @@ VERSION_QUAD=$(echo -n "$VERSION" | sed -re 's/^([0-9.]*).*$/\1/' | tr . ,) # Pass version and commit information into the resource compiler defs= -[ ! -z "$VERSION" ] && defs+=( "-D DOCKER_VERSION=\"$VERSION\"") -[ ! -z "$VERSION_QUAD" ] && defs+=( "-D DOCKER_VERSION_QUAD=$VERSION_QUAD") -[ ! -z "$GITCOMMIT" ] && defs+=( "-D DOCKER_COMMIT=\"$GITCOMMIT\"") +[ -n "$VERSION" ] && defs+=( "-D DOCKER_VERSION=\"$VERSION\"") +[ -n "$VERSION_QUAD" ] && defs+=( "-D DOCKER_VERSION_QUAD=$VERSION_QUAD") +[ -n "$GITCOMMIT" ] && defs+=( "-D DOCKER_COMMIT=\"$GITCOMMIT\"") function makeres { "$WINDRES" \ diff --git a/components/cli/scripts/test/e2e/run b/components/cli/scripts/test/e2e/run index 173397a703..b960709701 100755 --- a/components/cli/scripts/test/e2e/run +++ b/components/cli/scripts/test/e2e/run @@ -70,7 +70,7 @@ function runtests { GOPATH="$GOPATH" \ PATH="$PWD/build/:/usr/bin" \ HOME="$HOME" \ - "$(which go)" test -v ./e2e/... ${TESTFLAGS-} + "$(command -v go)" test -v ./e2e/... ${TESTFLAGS-} } export unique_id="${E2E_UNIQUE_ID:-cliendtoendsuite}"