From 6b05256020d2f7d823fc133422aab2d9c4f5004a Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 4 Feb 2018 09:24:41 +0100 Subject: [PATCH 1/2] flake8 test to find syntax errors, undefined names --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7976b104e..78cc123f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,8 +24,13 @@ before_install: install: - echo "No install action required. Implicitly performed by the testing." + - pip install flake8 -# before_script: +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 --pytest-args "tests/ --doctest-modules -v --cov moviepy --cov-report term-missing" From c023a73e7153728ff004fc778e92a1fdb0a20962 Mon Sep 17 00:00:00 2001 From: cclauss Date: Tue, 13 Feb 2018 00:25:38 +0100 Subject: [PATCH 2/2] Add --exit-zero to all flake8 tests We can reverse this later but at least we can get the tests in place but allow the to fail without breaking the build. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 78cc123f7..65be1d0e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ install: 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 + - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics --exit-zero # 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