Fix the Shellcheck CI job, red since the CAD kernel-test loop landed

The Shellcheck workflow has failed on every push and every scheduled run since
2026-07-24, on exactly one finding: SC2029 in scripts/kernel-test.sh, the file
the CAD branch added. So the CAD work is what turned that job red, and a PR
arriving with a red job is a bad way to open a conversation with a maintainer.

Client-side expansion of $REMOTE is the intended behaviour — it is derived from
$VOL locally and the remote has no such variable, exactly as the rsync
destination two lines down relies on. So this is a disable with a reason, not a
silencing: the note says why the warning does not apply.

Verified by running the workflow's own command over all 24 matched scripts:
exit 0, no findings.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tommaso Bianchi
2026-07-26 08:46:35 +02:00
co-authored by Claude Opus 5
parent e2b921745d
commit 9c199e4a38
+3
View File
@@ -55,6 +55,9 @@ echo "REPO=$REPO IMAGE=$IMAGE VOL=$VOL TAGS=$TAGS HOST=${HOST:-local}"
if [[ -n "$HOST" ]]; then
# Stage per-volume so parallel workers never share a remote tree.
REMOTE="kt-$VOL" # relative: ssh and rsync both start in the remote home dir
# SC2029: $REMOTE expanding on the CLIENT is the point -- it is derived from $VOL here,
# and the remote has no such variable. The rsync destination below expands it the same way.
# shellcheck disable=SC2029
ssh "$HOST" "mkdir -p $REMOTE"
# Only the inputs the build reads. --delete keeps a stale file from a prior worker from
# silently compiling in.