[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Run shellcheck for stuff in scripts/ as part of 'make check'



commit 136e6e7cebbba00e7bd33cb1bc1e660e01e966fd
Author: rl1987 <rl1987@xxxxxxxxxxxxxxxx>
Date:   Sat Dec 15 10:47:30 2018 +0200

    Run shellcheck for stuff in scripts/ as part of 'make check'
---
 Makefile.am | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index a94513021..272724340 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -215,7 +215,16 @@ doxygen:
 test: all
 	$(top_builddir)/src/test/test
 
-check-local: check-spaces check-changes check-includes
+shellcheck:
+        # Only use shellcheck if it is present
+	if command -v shellcheck; then \
+	        find $(top_srcdir)/scripts/ -name "*.sh" -exec shellcheck {} +; \
+	        if [ -d "$(top_srcdir)/scripts/test" ]; then \
+                        shellcheck $(top_srcdir)/scripts/test/cov-diff $(top_builddir)/scripts/test/coverage; \
+                fi; \
+	fi
+
+check-local: check-spaces check-changes check-includes shellcheck
 
 need-chutney-path:
 	@if test ! -d "$$CHUTNEY_PATH"; then \



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits