-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check our Python scripts by adding a Flake8 workflow to the GitHub actions. Add a config file that disables every check that currently has errors for our Python code, so no errors should be reported initially. The intention is to gradually re-enable these checks and fix the corresponding issues (similarly to how we handle clang-tidy).
- Loading branch information
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[flake8] | ||
exclude = .git,__pycache__,lang/json | ||
ignore = | ||
# The following errors were present when starting to use flake8; they need | ||
# to be triaged to determine which we should fix and which we should leave | ||
# permanently ignored | ||
E111, | ||
E123, | ||
E128, | ||
E131, | ||
E201, | ||
E202, | ||
E225, | ||
E231, | ||
E241, | ||
E261, | ||
E262, | ||
E265, | ||
E266, | ||
E302, | ||
E305, | ||
E501, | ||
E713, | ||
E722, | ||
E731, | ||
F821, | ||
F841, | ||
W291, | ||
W391, | ||
W503, | ||
W504, | ||
W605 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Flake8 Python linting | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout repository | ||
uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 10 | ||
- name: run Flake8 | ||
run: flake8 |