aboutsummaryrefslogtreecommitdiffstats
path: root/tox.ini
diff options
context:
space:
mode:
authorEmma Foley <emma.l.foley@intel.com>2017-11-02 16:50:14 +0000
committerEmma Foley <emma.l.foley@intel.com>2017-11-17 17:18:30 +0000
commit44070670c798d2cde2824f3150b2b11bf35c6319 (patch)
tree5349fca98fa3a01ddd3f50f49847e0ced1c37528 /tox.ini
parentb22b09d3e58bc01105165434a1220f581d6ab31b (diff)
Tox: add a pep8 target
Adds a pep8, pep8-full targets to tox: * pep8 target: runs pylint on the changed files * pep8-full target: runs pylint on whole repo Adds scripts to run pylint: * stored in tools/ Documentation: changeed the command for running tests (run_tests.sh -> tox). This runs the same set of tests as before. JIRA: YARDSTICK-832 Change-Id: I652da87723682d958f3fcbc2eb4cd88422636a3b Signed-off-by: Emma Foley <emma.l.foley@intel.com>
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini22
1 files changed, 9 insertions, 13 deletions
diff --git a/tox.ini b/tox.ini
index 6c568f3fe..882543d0c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,7 +1,7 @@
[tox]
minversion = 2.0
skipsdist = True
-envlist = py27,py3
+envlist = py27,py3,pep8
[testenv]
usedevelop=True
@@ -12,24 +12,20 @@ deps =
commands = /bin/bash ./run_tests.sh
whitelist_externals = /bin/bash
-
[testenv:py27]
# don't re-run coverage on both py27 py3, it takes too long
setenv =
SKIP_COVERAGE=1
-[flake8]
-# E125 is deliberately excluded. See https://github.com/jcrocholl/pep8/issues/126
-# The rest of the ignores are TODOs
-# New from hacking 0.9: E129, E131, H407, H405
-# E251 Skipped due to https://github.com/jcrocholl/pep8/issues/301
+[testenv:pep8]
+# for gate testing, scans only the files changed in the last commit
+commands =
+ /bin/bash tools/coding-checks.sh --pylint HEAD~ '{posargs}'
-# nova flake8 ignores
-#ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,H405
-# dovetail flake8 ignores
-ignore = E123,E125,H803
-max-line-length = 99
-exclude = .venv,.git,.tox,dist,docs,*egg,build
+[testenv:pep8-full]
+# For manual testing, scans the whole codebase
+commands =
+ /bin/bash tools/coding-checks.sh --pylint '{posargs}'
[testenv:os-requirements]
commands =