Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Commit 99117ea

Browse files
author
William Douglas
committed
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>
1 parent ee42901 commit 99117ea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

scripts/shellcheck.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ file="$1"
2727
if [[ "${file/*./}" == "bats" ]]; then
2828
sed 's/^@.*/func() {/' "$file" |
2929
sed 's/^load.*/source test\/functional\/testlib.bash/' |
30-
shellcheck -s bash -x -e SC1008,SC2119 /dev/stdin
30+
shellcheck -s bash -x -e SC1008,SC2119,SC2317 /dev/stdin
3131
else
3232
shellcheck -x "$file" -e SC2119
3333
fi

test/real_content/real_content_lib.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ test_setup() {
133133
continue
134134
fi
135135

136-
VERSION[$i]=$v
136+
VERSION[i]=$v
137137
i=$((i+1))
138138
done
139139

0 commit comments

Comments
 (0)