]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Run shellcheck for stuff in scripts/ as part of 'make check'
authorrl1987 <rl1987@sdf.lonestar.org>
Sat, 15 Dec 2018 08:47:30 +0000 (10:47 +0200)
committerNick Mathewson <nickm@torproject.org>
Tue, 15 Jan 2019 13:08:29 +0000 (08:08 -0500)
Makefile.am

index a945130213977ca222623775917e08ea396cdc13..272724340bc228a65d83351e9b265e1f89eb0c36 100644 (file)
@@ -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 \