[COMMON] Add a shellcheck tox profile 00/126200/3
authorguillaume.lambert <guillaume.lambert@orange.com>
Fri, 10 Dec 2021 19:26:19 +0000 (20:26 +0100)
committerGuillaume Lambert <guillaume.lambert@orange.com>
Sun, 12 Dec 2021 00:47:19 +0000 (00:47 +0000)
Shellcheck is a shell linter.
It can include good remarks as well as false positives.
It is currently not activated in the CI.

Issue-ID: OOM-2643
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: Ie392ce030f877ab6bdca9e91d7f8ec6820f34d79

tox.ini

diff --git a/tox.ini b/tox.ini
index 337b397..01019bb 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -62,6 +62,13 @@ whitelist_externals =
 commands =
     {toxinidir}/.ci/check-bashisms.sh
 
 commands =
     {toxinidir}/.ci/check-bashisms.sh
 
+[testenv:shellcheck]
+basepython = python3
+deps = shellcheck-py
+whitelist_externals = find
+commands =
+    find . -not -path '*/\.*' -name *.sh -exec shellcheck \{\} +
+
 [testenv:autopep8]
 deps =
     -r{toxinidir}/requirements.txt
 [testenv:autopep8]
 deps =
     -r{toxinidir}/requirements.txt