From fec60830441602591c43309dd1d564f08198dca6 Mon Sep 17 00:00:00 2001 From: Trevor Bramwell Date: Mon, 10 Dec 2018 09:23:57 -0800 Subject: 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 --- dashboard/tox.ini | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 dashboard/tox.ini diff --git a/dashboard/tox.ini b/dashboard/tox.ini new file mode 100644 index 0000000..3d01e10 --- /dev/null +++ b/dashboard/tox.ini @@ -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/ -- cgit 1.2.3-korg