ClickHouse/utils/check-style/shellcheck-run.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
623 B
Bash
Raw Normal View History

2020-12-28 11:46:53 +00:00
#!/usr/bin/env bash
ROOT_PATH=$(git rev-parse --show-toplevel)
NPROC=$(($(nproc) + 3))
2020-12-28 11:46:53 +00:00
# Check sh tests with Shellcheck
( cd "$ROOT_PATH/tests/queries/0_stateless/" && \
find "$ROOT_PATH/tests/queries/"{0_stateless,1_stateful} -name '*.sh' -print0 | \
xargs -0 -P "$NPROC" -n 20 shellcheck --check-sourced --external-sources --severity info --exclude SC1071,SC2086,SC2016
)
2020-12-28 11:46:53 +00:00
# Check docker scripts with shellcheck
find "$ROOT_PATH/docker" -executable -type f -exec file -F' ' --mime-type {} \; | \
awk -F' ' '$2==" text/x-shellscript" {print $1}' | \
grep -v "compare.sh" | \
xargs -P "$NPROC" -n 20 shellcheck