From 136e6e7cebbba00e7bd33cb1bc1e660e01e966fd Mon Sep 17 00:00:00 2001 From: rl1987 Date: Sat, 15 Dec 2018 10:47:30 +0200 Subject: [PATCH 1/3] 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 a945130213..272724340b 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 \ From 78574557296dc004e1eab95c4839d5cf40c96638 Mon Sep 17 00:00:00 2001 From: rl1987 Date: Sat, 15 Dec 2018 11:08:16 +0200 Subject: [PATCH 2/3] Add shellcheck to Travis CI builds --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 2ea529e252..474f6867fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -131,6 +131,7 @@ addons: - docbook-xsl - docbook-xml - xmlto + - shellcheck ## (OSX only) homebrew: packages: @@ -154,6 +155,7 @@ addons: ## Always installed, because manual brew installs are hard to get right - asciidoc - xmlto + - shellcheck ## (OSX only) Use the default OSX image ## See https://docs.travis-ci.com/user/reference/osx#os-x-version From 30a925fe96ed69284a915c8e80d0f7ef7b556786 Mon Sep 17 00:00:00 2001 From: rl1987 Date: Sat, 15 Dec 2018 13:53:37 +0200 Subject: [PATCH 3/3] Add changes file --- changes/ticket28058 | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changes/ticket28058 diff --git a/changes/ticket28058 b/changes/ticket28058 new file mode 100644 index 0000000000..00ac595864 --- /dev/null +++ b/changes/ticket28058 @@ -0,0 +1,2 @@ + o Testing: + - Run shellcheck for stuff in scripts/ directory. Closes ticket 28058.