diff options
author | Gerald Combs <gerald@wireshark.org> | 2016-09-26 10:34:04 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2016-09-26 23:17:02 +0000 |
commit | b725d6c9acc403dba30c72d20cf7103e4f490334 (patch) | |
tree | 90a8b5d226630b8ed14fb9d5a1a50104a254bf6a /Makefile.am | |
parent | 06352a27b1ad2f9197b6193f97fad0c6947cc6d6 (diff) |
Add an initial "shellcheck" target.
Look for shellcheck in Autotools and CMake, and if found add a target
that checks some of our shell scripts.
Add a "source=" directive to targets that include test-common.sh so
that shellcheck will correctly process the scripts. Note that this
requires shellcheck 0.4.0 or later.
To do: Fix the issues that shellcheck found and check more scripts.
Change-Id: I441f9f59d8a3f8eec6718119c2370f2560b98f3c
Reviewed-on: https://code.wireshark.org/review/17943
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index df838a911a..a52bfc5e40 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1181,6 +1181,22 @@ checkapi: checkapi_local cd writecap && $(MAKE) checkapi cd wsutil && $(MAKE) checkapi +if HAVE_SHELLCHECK +# --external-sources requires 0.4.0 or later. +shellcheck: + cd $(top_srcdir) && \ + shellcheck --external-sources \ + tools/fuzz-test.sh \ + tools/randpkt-test.sh \ + tools/runa2x.sh \ + tools/test-captures.sh \ + tools/valgrind-wireshark.sh +else +shellcheck: + @echo "Shellcheck not available." ; \ + false +endif + wsar_html: doxygen.cfg doxygen_global.cfg FORCE if HAVE_DOXYGEN rm -rf wsar_html |