From 8444de800deebf2199f51f93237acdf087e35454 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sun, 27 Oct 2019 11:10:58 +0100 Subject: [PATCH 1/2] build: find Python syntax errors in dependencies As discussed in https://github.com/nodejs/node/issues/30129#issuecomment-546662351, when we vendor in code, we own the Syntax Errors in that code. This PR adds The `.flake8` config file at the root of this repo puts blinders on the linting of our dependencies so this test disables that file before linting. --- .travis.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.travis.yml b/.travis.yml index 8aa321ec1626d8..04b78d9e34a6b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -88,3 +88,13 @@ jobs: - if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then bash -x tools/lint-pr-commit-message.sh ${TRAVIS_PULL_REQUEST}; fi + + - name: "Find syntax errors in our Python dependencies" + language: python + python: 3.8 + install: + - mv .flake8 disabled.flake8 # take the blinders off of flake8 + - python3.8 -m pip install --upgrade pip + - python3.8 -m pip install flake8 + script: + - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics From c69a472219e6ce04141be76c73461eb1b455ad30 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sun, 27 Oct 2019 14:57:36 +0100 Subject: [PATCH 2/2] fixup: allow_failures until dependencies pass --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 04b78d9e34a6b3..6c16bdad821f0d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -98,3 +98,5 @@ jobs: - python3.8 -m pip install flake8 script: - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + allow_failures: # TODO (cclauss): remove this when dependencies are clean + - name: "Find syntax errors in our Python dependencies"