From 19dbd431c52994fc14bf7cb2e1a1a0dc686c2599 Mon Sep 17 00:00:00 2001 From: rl1987 Date: Sun, 9 Jun 2019 18:20:36 +0300 Subject: [PATCH 1/3] Shellcheck all the scripts --- Makefile.am | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 7a0d40d6a5..df30e0b59a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -224,10 +224,19 @@ test: all shellcheck: # Only use shellcheck if it is present if command -v shellcheck; then \ - find $(top_srcdir)/scripts/ -name "*.sh" -exec shellcheck {} +; \ + find "$(top_srcdir)" -name "*.sh" -not -path "$(top_srcdir)/src/ext/*" -exec shellcheck {} +; \ if [ -d "$(top_srcdir)/scripts/test" ]; then \ shellcheck $(top_srcdir)/scripts/test/cov-diff $(top_srcdir)/scripts/test/coverage; \ fi; \ + if [ -e "$(top_srcdir)/contrib/dirauth-tools/nagios-check-tor-authority-cert" ]; then \ + shellcheck "$(top_srcdir)/contrib/dirauth-tools/nagios-check-tor-authority-cert"; \ + fi; \ + if [ -e "$(top_srcdir)/contrib/client-tools/torify" ]; then \ + shellcheck "$(top_srcdir)/contrib/client-tools/torify"; \ + fi; \ + if [ -d "$(top_srcdir)/scripts/git" ]; then \ + shellcheck $(top_srcdir)/scripts/git/*.git-hook; \ + fi; \ fi check-local: check-spaces check-changes check-includes check-best-practices shellcheck From e8da65ee91658d7223739828a3e070e8e33a17ac Mon Sep 17 00:00:00 2001 From: rl1987 Date: Sun, 9 Jun 2019 18:21:14 +0300 Subject: [PATCH 2/3] Fix SC2034 in pre-push.git-hook --- scripts/git/pre-push.git-hook | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/git/pre-push.git-hook b/scripts/git/pre-push.git-hook index c9e72a4d43..e2a636e6d7 100755 --- a/scripts/git/pre-push.git-hook +++ b/scripts/git/pre-push.git-hook @@ -35,7 +35,6 @@ if [ -e scripts/maint/practracker/practracker.py ]; then fi remote="$1" -remote_loc="$2" remote_name=$(git remote --verbose | grep "$2" | awk '{print $1}' | head -n 1) From 86478be50f4364025310d2846d16d09c15962387 Mon Sep 17 00:00:00 2001 From: rl1987 Date: Sun, 9 Jun 2019 18:23:05 +0300 Subject: [PATCH 3/3] Add changes file --- changes/ticket29533 | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changes/ticket29533 diff --git a/changes/ticket29533 b/changes/ticket29533 new file mode 100644 index 0000000000..27ef681218 --- /dev/null +++ b/changes/ticket29533 @@ -0,0 +1,3 @@ + o Testing: + - Run shellcheck for all non-third-party shell scripts that are shipped + with Tor. Closes ticket 29533.