2020-12-28 11:46:53 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
ROOT_PATH=$(git rev-parse --show-toplevel)
|
2023-05-23 22:27:29 +00:00
|
|
|
NPROC=$(($(nproc) + 3))
|
2020-12-28 11:46:53 +00:00
|
|
|
# Check sh tests with Shellcheck
|
2024-02-28 23:21:50 +00:00
|
|
|
find "$ROOT_PATH/tests/queries/"{0_stateless,1_stateful} -name '*.sh' -print0 | \
|
2024-02-29 10:29:14 +00:00
|
|
|
xargs -0 -P "$NPROC" -n 20 shellcheck --check-sourced --external-sources --source-path=SCRIPTDIR \
|
2024-02-28 23:21:50 +00:00
|
|
|
--severity info --exclude SC1071,SC2086,SC2016
|
2020-12-28 11:46:53 +00:00
|
|
|
|
|
|
|
# Check docker scripts with shellcheck
|
2024-02-28 23:21:50 +00:00
|
|
|
# Do not check sourced files, since it causes broken --source-path=SCRIPTDIR
|
|
|
|
find "$ROOT_PATH/docker" -type f -exec file -F' ' --mime-type {} + | \
|
|
|
|
awk '$2=="text/x-shellscript" {print $1}' | \
|
2023-05-23 22:27:29 +00:00
|
|
|
grep -v "compare.sh" | \
|
2024-02-29 10:29:14 +00:00
|
|
|
xargs -P "$NPROC" -n 20 shellcheck --external-sources --source-path=SCRIPTDIR
|