From b325c439cec5807d727a72cde32b63a7e11871c4 Mon Sep 17 00:00:00 2001 From: cclauss Date: Wed, 18 Apr 2018 20:45:12 +0200 Subject: [PATCH] Use flake8 to find syntax errors and undefined names --- .travis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1f30abb..81c10cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,10 +39,16 @@ before_script: install: - pip2 install . - - pip2 install six + - pip2 install flake8 six - pip2 install -r requirements-docs.txt - pip2 install -r requirements-optional.txt +before_script: + # stop the build if there are Python syntax errors or undefined names + - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + script: - python setup.py test - python setup.py doc