Skip to content

Commit

Permalink
Add Flake8 workflow
Browse files Browse the repository at this point in the history
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
jbytheway committed Sep 15, 2020
1 parent a883429 commit 5b311f0
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .flake8
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
21 changes: 21 additions & 0 deletions .github/workflows/flake8.yml
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

0 comments on commit 5b311f0

Please sign in to comment.