mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-08-25 15:36:19 +00:00
a3c1f97c57
Make sure shellcheck and shellcheck bats are using the same configuration to run shellcheck Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
26 lines
466 B
Bash
Executable File
26 lines
466 B
Bash
Executable File
#!/usr/bin/env bats
|
|
|
|
# Author: Otavio Pontes
|
|
# Email: otavio.pontes@intel.com
|
|
|
|
@test "ANL002: Shellcheck on all files" {
|
|
local error=0
|
|
status=0
|
|
output=""
|
|
TESTS=$(find . -regex ".*\\.bats\\|.*\\.bash" | sort)
|
|
for i in $TESTS; do
|
|
echo checking "$i" >&3
|
|
|
|
run "$BATS_TEST_DIRNAME"/../../scripts/shellcheck.bash "$i"
|
|
echo "Result: $status" >&3
|
|
if [ ! "$status" -eq "0" ]; then
|
|
echo "$output" >&3
|
|
error=1
|
|
fi
|
|
echo >&3
|
|
|
|
done
|
|
|
|
[ "$error" -eq "0" ]
|
|
}
|