]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
tox: Add 'bashate' target
authorStephen Finucane <stephen@that.guru>
Wed, 4 Jan 2017 13:14:33 +0000 (13:14 +0000)
committerStephen Finucane <stephen@that.guru>
Mon, 6 Feb 2017 18:58:05 +0000 (18:58 +0000)
This is not as powerful as Shellcheck (yet), but it's Python and
therefore installable in a virtualenv.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Reviewed-by: Daniel Axtens <dja@axtens.net>
tox.ini

diff --git a/tox.ini b/tox.ini
index 319a8c70f5196c136f071ba628245b02fbbc1001..bf38f8f416e4c475ca1b6739f6dd0e5464994287 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -25,6 +25,15 @@ commands =
     {toxinidir}/manage.py test --noinput --liveserver=localhost:9000-9200 \
         '{posargs:patchwork}'
 
+[testenv:bashate]
+deps = bashate>=0.5,<0.6
+whitelist_externals = bash
+commands =
+    bash -c "find {toxinidir} \
+    -not \( -type d -name .?\* -prune \) \
+    -not \( -type d -name db -prune \) \
+    -name \*.sh -print | xargs bashate"
+
 [testenv:pep8]
 basepython = python2.7
 deps = flake8