From d9da7a7a1ab5b4199b17770d222fc5f041e4ad3e Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 2 Dec 2020 07:46:50 +0200 Subject: test: use shellcheck to check most shell code Split the Bash template into smaller files that don't use templating, and check those file. Fix the couple of things shellcheck complained about. --- check | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'check') diff --git a/check b/check index 47857d2..ccd978d 100755 --- a/check +++ b/check @@ -49,6 +49,12 @@ then $hideok flake8 templates/python lib/*.py --exclude=template.py fi +if command -v shellcheck > /dev/null +then + shellcheck check ./*.sh + find templates/bash -name '*.sh' ! -name template.sh -exec shellcheck '{}' + +fi + $hideok cargo build --all-targets if cargo --list | awk '{ print $1 }' | grep 'clippy$' > /dev/null then @@ -67,7 +73,7 @@ then -exec black --check '{}' + fi -for md in [^CR]*.md lib/*.md +for md in [!CR]*.md lib/*.md do $hideok echo "$md =====================================" codegen "$md" test.py -- cgit v1.2.1