Add ShellCheck to tox 94/4094/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Sat, 4 Mar 2017 18:04:21 +0000 (13:04 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Sat, 4 Mar 2017 18:04:21 +0000 (13:04 -0500)
Change-Id: Ib76fe08933a360a3e676ea6f825934c1f6f830c9
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
run_shellcheck [new file with mode: 0755]
tox.ini

diff --git a/run_shellcheck b/run_shellcheck
new file mode 100755 (executable)
index 0000000..c134a94
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+command -v shellcheck >/dev/null 2>&1 || {
+    echo >&2 "ShellCheck is not installed. Please install using your favourite package manager."
+    exit 1
+}
+
+shellcheck shell/*
diff --git a/tox.ini b/tox.ini
index 9bc7eba..09cc1a9 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -12,3 +12,6 @@ whitelist_externals = echo
 [testenv:docs-linkcheck]
 deps = -rrequirements.txt
 commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
+
+[testenv:shellcheck]
+commands = ./run_shellcheck