forked from HurricaneLabs/splunksecrets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
72 lines (61 loc) · 1.55 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
[tox]
envlist = py27,
py35,
linters,
coverage
[travis]
python =
2.7: py27
3.5: py35, linters
###
# Base - run some tests
###
[testenv]
whitelist_externals = bash
mv
deps = nose2
cov-core
usedevelop = true
commands = bash -c "if [ ! -d .coverage_data ]; then mkdir .coverage_data; fi"
coverage run -a --rcfile={toxinidir}/.coveragerc -m nose2 -v
mv {toxinidir}/.coverage {toxinidir}/.coverage_data/.coverage.{envname}
###
# Test Coverage
###
[testenv:coverage]
deps = cov-core
skip_install = true
commands = bash -c "if [ -d .coverage_data ]; then coverage combine .coverage_data ; rmdir .coverage_data ; fi"
coverage report --rcfile={toxinidir}/.coveragerc
###
# Code Quality
###
[testenv:linters]
deps = {[testenv:pylint]deps}
{[testenv:flake8]deps}
{[testenv:bandit]deps}
commands: {[testenv:pylint]commands}
{[testenv:flake8]commands}
{[testenv:bandit]commands}
[testenv:pylint]
deps = pyflakes
pylint
commands = pylint --reports=n --rcfile={toxinidir}/pylint.rc splunksecrets.py
[testenv:flake8]
deps = flake8
flake8-quotes
flake8-import-order
skip_install = true
commands = flake8 splunksecrets.py tests.py
[flake8]
# max-complexity = 15
# ignore = F403
inline-quotes = "
exclude = .coverage_data,.tox,dist
max-line-length = 120
import-order-style = smarkets
application-import-names = splunksecrets
[testenv:bandit]
deps = bandit
skip_install = true
commands = bandit -r -c {toxinidir}/.bandit.yml splunksecrets.py