Skip to content

Commit c5d312f

Browse files
cclausstargos
authored andcommitted
build: find Python syntax errors in dependencies
As discussed in #30129 (comment), 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. fixup: allow_failures until dependencies pass PR-URL: #30143 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Sam Roberts <[email protected]>
1 parent df0fbf2 commit c5d312f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.travis.yml

+12
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,15 @@ jobs:
9191
- if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
9292
bash -x tools/lint-pr-commit-message.sh ${TRAVIS_PULL_REQUEST};
9393
fi
94+
95+
- name: "Find syntax errors in our Python dependencies"
96+
language: python
97+
python: 3.8
98+
install:
99+
- mv .flake8 disabled.flake8 # take the blinders off of flake8
100+
- python3.8 -m pip install --upgrade pip
101+
- python3.8 -m pip install flake8
102+
script:
103+
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
104+
allow_failures: # TODO (cclauss): remove this when dependencies are clean
105+
- name: "Find syntax errors in our Python dependencies"

0 commit comments

Comments
 (0)