mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-04-28 10:53:43 +00:00
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:
committed by
William Douglas
parent
ee42901d83
commit
79717bd2cd
@@ -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
|
||||
|
||||
@@ -133,7 +133,7 @@ test_setup() {
|
||||
continue
|
||||
fi
|
||||
|
||||
VERSION[$i]=$v
|
||||
VERSION[i]=$v
|
||||
i=$((i+1))
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user