summaryrefslogtreecommitdiffstats
path: root/tox.ini
diff options
context:
space:
mode:
authorkrishnaa96 <krishna.moorthy6@wipro.com>2020-08-17 11:10:38 +0530
committerkrishnaa96 <krishna.moorthy6@wipro.com>2020-08-17 11:14:59 +0530
commit2d770e68218a19ec3b0da34d3242355dd69e1a70 (patch)
treef004caae8e86bbaf104761b4b731d5254e162fe3 /tox.ini
parentfd666be1d7e054ed2fbcd7d85987da7e04db2e01 (diff)
Add new tox env to check for pep8 issues
The linter will check for issues in new and updated files for a new commit Issue-ID: OPTFRA-837 Signed-off-by: krishnaa96 <krishna.moorthy6@wipro.com> Change-Id: I2e2c29753574cf8e37a65ec7a4a70bbb9f6cf50f
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini14
1 files changed, 13 insertions, 1 deletions
diff --git a/tox.ini b/tox.ini
index 11c541a..1606b9b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,7 +1,7 @@
[tox]
skipsdist=True
-envlist = py3, pylint
+envlist = py3, pylint, flake8diff
[testenv]
distribute = False
@@ -29,3 +29,15 @@ commands = bash -c "pylint --reports=y osdf apps runtime| tee pylint.out"
[testenv:py3]
basepython=python3.6
+
+[testenv:flake8diff]
+whitelist_externals=bash
+deps = hacking>=2.0.0
+commands =
+ bash -c "files=$(git diff HEAD^ HEAD --diff-filter=d --name-only | grep -E '(^apps\/|osdf\/|runtime\/)'| grep -E '*\.py$'); if [[ -z $files ]]; then exit 0; else flake8 $files; fi"
+
+[flake8]
+select = E,H,W,F
+max-line-length = 119
+ignore =
+per-file-ignores=