chore(tox): cleanup tox

This patch set cleans up tox.ini and puts bandit as part of the pep8
target similar to keystone. This consolidates all the static code
analysis and linting to a single gate job or check.

Change-Id: I29b60fb9a2fbf14f321d9c2605216118f73f8bf7
Signed-off-by: Tin Lam <tin@irrational.io>
This commit is contained in:
Tin Lam 2018-05-26 20:00:14 -05:00 committed by Felipe Monteiro
parent 119080b597
commit e705bc147d
1 changed files with 11 additions and 4 deletions

15
tox.ini
View File

@ -1,4 +1,6 @@
[tox]
minversion = 2.3.1
skipsdist = True
envlist = py{35,27},py{35,27}-{postgresql},functional,cover,pep8,bandit,docs
[testenv]
@ -74,9 +76,7 @@ commands =
coverage report
[testenv:bandit]
whitelist_externals = bandit
commands =
bandit -r deckhand -x deckhand/tests -n 5
commands = bandit -r deckhand -x deckhand/tests -n 5
[testenv:genconfig]
commands = oslo-config-generator --config-file=etc/deckhand/config-generator.conf
@ -85,7 +85,14 @@ commands = oslo-config-generator --config-file=etc/deckhand/config-generator.con
commands = oslopolicy-sample-generator --config-file=etc/deckhand/policy-generator.conf
[testenv:pep8]
commands = flake8 {posargs}
deps =
.[bandit]
{[testenv]deps}
commands =
flake8 {posargs}
# Run security linter as part of the pep8 gate instead of using separate job.
bandit -r deckhand -x deckhand/tests -n 5
[flake8]
# [H106] Dont put vim configuration in source files.