[COMMON] Enforce checkbashisms tox profile
[oom.git] / tox.ini
1 [tox]
2 minversion = 1.6
3 envlist =
4  docs,
5  docs-linkcheck,
6  gitlint,
7  checkbashisms,
8 skipsdist=true
9
10 [doc8]
11 ignore-path-errors=docs/helm-search.txt;D001
12
13 [testenv:doc8]
14 deps = -rdocs/requirements-docs.txt
15 commands =
16  doc8 docs/
17
18 [testenv:docs]
19 deps = -rdocs/requirements-docs.txt
20 commands =
21  sphinx-build -q -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
22
23 [testenv:docs-linkcheck]
24 deps = -rdocs/requirements-docs.txt
25 commands = sphinx-build -q -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
26
27 [testenv:spelling]
28 #basepython = python3
29 whitelist_externals = wget
30 deps =
31     -rdocs/requirements-docs.txt
32     sphinxcontrib-spelling
33     PyEnchant
34 changedir={toxinidir}/docs
35 commands =
36     wget -nv https://git.onap.org/doc/plain/docs/spelling_wordlist.txt -O spelling_wordlist.txt
37     sphinx-build -b spelling -d {envtmpdir}/doctrees . _build/spelling
38
39 [testenv:gitlint]
40 basepython = python3
41 deps =
42   gitlint
43
44 commands =
45   gitlint
46
47 [testenv:checkbashisms]
48 deps =
49 whitelist_externals = sh
50                       find
51                       checkbashisms
52 commands =
53     sh -c 'which checkbashisms>/dev/null  || sudo yum install devscripts-minimal || sudo apt-get install devscripts \
54         || (echo "checkbashisms command not found - please install it (e.g. sudo apt-get install devscripts | \
55         yum install devscripts-minimal )" >&2 && exit 1)'
56     find . -not -path '*/\.*' -name *.sh -exec checkbashisms \{\} +
57
58 [testenv:autopep8]
59 deps = autopep8
60 commands =
61     autopep8 --max-line-length 120 --in-place --recursive kubernetes/ TOSCA/ docs/
62
63 [testenv:pylint]
64 deps = pylint
65 whitelist_externals = find
66 commands =
67     find kubernetes/ TOSCA/ docs/ -name *.py -exec pylint --max-line-length=120 --disable=missing-docstring --method-rgx="(([a-z_][a-zA-Z0-9_]{2,})|(_[a-z0-9_]*)|(__[a-zA-Z][a-zA-Z0-9_]+__))$" --variable-rgx="[a-zA-Z_][a-zA-Z0-9_]{1,30}$" --reports=y --score=y  --output-format=colorized  \{\} +
68