diff options
author | Trevor Bramwell <tbramwell@linuxfoundation.org> | 2018-12-10 09:23:57 -0800 |
---|---|---|
committer | Trevor Bramwell <tbramwell@linuxfoundation.org> | 2019-01-28 08:15:22 -0800 |
commit | 1f1d078a0846f4903c2425a30da86933221e2cb9 (patch) | |
tree | 53d7a2739722c5395033ea7497bba21987432fff | |
parent | 2c5650cad195f0bd78fb201ebbddc2afef96f752 (diff) |
Add Tox commands to lint Python code
This adds tox jobs for running flake8.
Flake8 is a syntax analyzer for python source code that combines
the tools pyflakes and pep8 into one.
This tool can be used to find syntax issues, unnecessary imports, and
style violations, which all improve the code quality and readability.
Change-Id: I7521c3a43ef4599eb12fd72e87a0c6ec0df61e7a
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
-rw-r--r-- | tox.ini | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,21 @@ +[tox] +envlist = flake8 +skipsdist = True + +[testenv] +deps = -rrequirements.txt +basepython = python3 + +# Store flake8 config here intead of .flake8 +[flake8] +ignore = + # Ignore 'line-too-long' warnings + E501 +exclude = + src/manage.py + +[testenv:flake8] +deps = + -rrequirements.txt + flake8 +commands = flake8 src/ |