X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=tox.ini;h=1606b9b80c809e3ce2916b2b0f7a697743ae8478;hb=a674e20f6d3508e84ec4b2842f47bfff83ec36bb;hp=2c30e73b2452f8796e2c4a19ba445098c858105f;hpb=7d4f37c45d50c56dfe438c04dbecea3ca9f7c9d2;p=optf%2Fosdf.git diff --git a/tox.ini b/tox.ini index 2c30e73..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 @@ -17,13 +17,27 @@ commands = # TODO: need to update the above "omit" when we package osdf as pip-installable deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test/test-requirements.txt + -r{toxinidir}/requirements-osdf.txt + -r{toxinidir}/requirements-opteng.txt [run] -source=./apps/,./osdf/,osdfapp.py +source=./apps/,./osdf/,osdfapp.py,./runtime/,solverapp.py [testenv:pylint] whitelist_externals=bash -commands = bash -c "pylint --reports=y osdf apps| tee pylint.out" +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=