forked from PyCQA/bandit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
106 lines (93 loc) · 2.42 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
[tox]
minversion = 3.2.0
envlist = py38,pep8
[testenv]
usedevelop = True
install_command = pip install {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
extras =
yaml
toml
baseline
sarif
commands =
find bandit -type f -name "*.pyc" -delete
stestr run {posargs}
allowlist_externals =
find
passenv =
http_proxy
HTTP_PROXY
https_proxy
HTTPS_PROXY
no_proxy
NO_PROXY
[testenv:debug]
commands = oslo_debug_helper -t tests {posargs}
[testenv:linters]
deps = {[testenv:pep8]deps}
usedevelop = False
commands = flake8 {posargs} bandit
flake8 {posargs} tests
bandit-baseline -r bandit -ll -ii
[testenv:pep8]
ignore_errors = true
deps = {[testenv]deps}
.
usedevelop = False
commands = flake8 {posargs} bandit
flake8 {posargs} tests
-{[testenv:pylint]commands}
bandit-baseline -r bandit -ll -ii
[testenv:venv]
commands = {posargs}
[testenv:codesec]
deps = {[testenv]deps}
.
usedevelop = False
commands = bandit-baseline -r bandit -ll -ii
[testenv:cover]
setenv =
{[testenv]setenv}
PYTHON=coverage run --source bandit --parallel-mode
commands =
coverage erase
stestr run '{posargs}'
coverage report
[testenv:docs]
deps = -r{toxinidir}/doc/requirements.txt
commands=
sphinx-build doc/source doc/build
[flake8]
# [H106] Don't put vim configuration in source files.
# [H203] Use assertIs(Not)None to check for None.
show-source = True
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
enable-extensions = H106,H203
[testenv:pylint]
commands = -pylint --rcfile=pylintrc bandit
[testenv:format]
skip_install = true
deps =
pre-commit
commands =
pre-commit run --all-files --show-diff-on-failure
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
# This environment can be used to quickly validate that all needed system
# packages required to successfully execute test targets are installed
[testenv:bindep]
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files.
deps = bindep
commands = bindep test