Fix up shellcheck issues

The mechanism used to convert bats tests to something shellcheck can
verify caused a large number of failures due to the introduction of
testing for if a call is possible. Given the tests aren't called in
a normal shell script way, it is best to just ignore this error for
bats files.

Also fix an index using '$' unnecessarily.

Signed-off-by: William Douglas <william.douglas@intel.com>
This commit is contained in:
William Douglas
2025-03-26 14:25:44 -07:00
committed by William Douglas
parent ee42901d83
commit 79717bd2cd
2 changed files with 2 additions and 2 deletions

View File

@@ -27,7 +27,7 @@ file="$1"
if [[ "${file/*./}" == "bats" ]]; then
sed 's/^@.*/func() {/' "$file" |
sed 's/^load.*/source test\/functional\/testlib.bash/' |
shellcheck -s bash -x -e SC1008,SC2119 /dev/stdin
shellcheck -s bash -x -e SC1008,SC2119,SC2317 /dev/stdin
else
shellcheck -x "$file" -e SC2119
fi

View File

@@ -133,7 +133,7 @@ test_setup() {
continue
fi
VERSION[$i]=$v
VERSION[i]=$v
i=$((i+1))
done