Skip to content

Commit

Permalink
ci: Update shellcheck.sh to pass all args to shellcheck (#2657)
Browse files Browse the repository at this point in the history
  • Loading branch information
marun authored Jan 25, 2024
1 parent e991d24 commit 1302ed8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/shellcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ SYSTEM_VERSION="$(get_version shellcheck)"
if [[ "${SYSTEM_VERSION}" == "${VERSION}" ]]; then
SHELLCHECK=shellcheck
else
SHELLCHECK="${REPO_ROOT}/build/shellcheck"
# Try to install a local version
SHELLCHECK="${REPO_ROOT}/bin/shellcheck"
LOCAL_VERSION="$(get_version "${SHELLCHECK}")"
if [[ -z "${LOCAL_VERSION}" || "${LOCAL_VERSION}" != "${VERSION}" ]]; then
if which sw_vers &> /dev/null; then
Expand All @@ -31,9 +31,9 @@ else
DIST="linux.${arch}"
fi
curl -s -L "https://github.com/koalaman/shellcheck/releases/download/${VERSION}/shellcheck-${VERSION}.${DIST}.tar.xz" | tar Jxv -C /tmp > /dev/null
mkdir -p "${REPO_ROOT}"/build
mkdir -p "$(dirname "${SHELLCHECK}")"
cp /tmp/shellcheck-"${VERSION}"/shellcheck "${SHELLCHECK}"
fi
fi

find "${REPO_ROOT}" -name "*.sh" -type f -print0 | xargs -0 "${SHELLCHECK}"
find "${REPO_ROOT}" -name "*.sh" -type f -print0 | xargs -0 "${SHELLCHECK}" "${@}"

0 comments on commit 1302ed8

Please sign in to comment.