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

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

10 lines
617 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)
EXCLUDE_DIRS='build/|integration/|widechar_width/|glibc-compatibility/|memcpy/|consistent-hashing/|Parsers/New'
# Check sh tests with Shellcheck
2020-12-29 10:29:54 +00:00
(cd $ROOT_PATH/tests/queries/0_stateless/ && shellcheck --check-sourced --external-sources --severity info --exclude SC1071,SC2086,SC2016 *.sh ../1_stateful/*.sh)
2020-12-28 11:46:53 +00:00
# Check docker scripts with shellcheck
2020-12-29 10:29:54 +00:00
find "$ROOT_PATH/docker" -executable -type f -exec file -F' ' --mime-type {} \; | awk -F' ' '$2==" text/x-shellscript" {print $1}' | grep -v "entrypoint.alpine.sh" | grep -v "compare.sh"| xargs shellcheck
2020-12-28 11:46:53 +00:00