From e705bc147d3e08d9b5bce1d94e1a1f12cf56fe36 Mon Sep 17 00:00:00 2001 From: Tin Lam Date: Sat, 26 May 2018 20:00:14 -0500 Subject: [PATCH] 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 --- tox.ini | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index 42bb92c9..875ee90e 100644 --- a/tox.ini +++ b/tox.ini @@ -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] Don’t put vim configuration in source files.