Files
swupd-client/test/code_analysis/shellcheck-all.bats
2019-07-12 16:32:18 -07:00

15 lines
364 B
Bash
Executable File

#!/usr/bin/env bats
# Author: Otavio Pontes
# Email: otavio.pontes@intel.com
@test "ANL002: Shellcheck on all files" {
find . -regex ".*\.bats\|.*\.bash" -print0 | while IFS= read -d '' -r i; do
echo checking "$i"
sed 's/^@.*/func() {/' "$i" |
sed 's/^load.*/source test\/functional\/testlib.bash/' |
shellcheck -s bash -x -e SC1008 /dev/stdin
done
}