[CI] replace shellcheck script with shellcheck-py hook (#52572)

Signed-off-by: Turner <doubleujabbour@gmail.com>
Signed-off-by: Turner Jabbour <doubleujabbour@gmail.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Turner Jabbour
2026-08-20 10:09:59 +00:00
committed by GitHub
co-authored by Claude Sonnet 5
parent 5b1e7a812b
commit 1eab6fef01
20 changed files with 204 additions and 197 deletions
-24
View File
@@ -1,24 +0,0 @@
#!/bin/bash
set -euo pipefail
scversion="stable"
if [ -d "shellcheck-${scversion}" ]; then
export PATH="$PATH:$(pwd)/shellcheck-${scversion}"
fi
if ! [ -x "$(command -v shellcheck)" ]; then
if [ "$(uname -s)" != "Linux" ] || [ "$(uname -m)" != "x86_64" ]; then
echo "Please install shellcheck: https://github.com/koalaman/shellcheck?tab=readme-ov-file#installing"
exit 1
fi
# automatic local install if linux x86_64
wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv
export PATH="$PATH:$(pwd)/shellcheck-${scversion}"
fi
# TODO - fix warnings in .buildkite/scripts/hardware_ci/run-amd-test.sh
find . -path ./.git -prune -o -name "*.sh" \
-not -path "./.buildkite/scripts/hardware_ci/run-amd-test.sh" -print0 | \
xargs -0 sh -c "for f in \"\$@\"; do git check-ignore -q \"\$f\" || shellcheck -s bash \"\$f\"; done" --