summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml11
1 files changed, 9 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml
index 63b73ecf..e536cb34 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -33,7 +33,7 @@ matrix:
# - BREW_INSTALL=python3
install:
- - pip install tox
+ - pip install flake8 tox
# - |
# if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
# if [[ -n "$BREW_INSTALL" ]]; then
@@ -41,7 +41,14 @@ install:
# brew install "$BREW_INSTALL"
# fi
# fi
-# pip install tox
+
+before_script:
+ # stop the build if there are Python syntax errors or undefined names
+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
+ if [[ $TOXENV == py37 ]]; then
+ flake8 . --count --exclude=./.*,./examples,./tests --select=E901,E999,F821,F822,F823 --show-source --statistics ;
+ flake8 . --count --exclude=./.* --exit-zero --max-complexity=10 --max-line-length=127 --statistics ;
+ fi
script:
- tox