Skip to content

Commit eb981e2

Browse files
marc-hbfredoh9
authored andcommitted
hijack.sh: properly disable shellcheck on fake logfile=$logfile definition
Fixes warning found in https://github.com/thesofproject/sof-test/actions/runs/4635603962/jobs/8202801248?pr=1018 testing PR #1018 See inline comments. Fixes commit 0ccb4c8 ("hijack.sh: more generic way to disable unknown $logfile shellcheck") Different shellcheck versions may warn about this fake definition differently but life is too short to compare them, just disable both SC2154 and SC2269 Signed-off-by: Marc Herbert <marc.herbert@intel.com>
1 parent cad9cef commit eb981e2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

case-lib/hijack.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ function func_exit_handler()
5252
sleep 1
5353

5454
# $logfile is defined in a different file (lib.sh)
55-
# shellcheck disable=SC2154
55+
# Instead of disabling SC2154 every time $logfile is used, fool
56+
# _shellcheck with a "fake" definition here where we can disable
57+
# SC2269 only once.
58+
# shellcheck disable=SC2154,SC2269
5659
logfile="$logfile"
5760

5861
local loggerBin wcLog; loggerBin=$(basename "$SOFLOGGER")

0 commit comments

Comments
 (0)