-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
36 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,3 @@ | ||
[flake8] | ||
ignore = F401,F405,W503,F841,F403,E402,F821,W291,E266,F811 | ||
max-line-length = 160 |
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,20 @@ | ||
name: Flake8 Check | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
lint: | ||
name: Linting with Flake8 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: Installing Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8==3.8.4 | ||
- name: Running Flake8 checks | ||
run: ./flake8-check |
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,13 @@ | ||
#!/bin/bash | ||
|
||
flake8-check() { | ||
flake8 && echo "Flake8 Check ✅" ||{ | ||
>&2 echo "Flake8 Check ❌" | ||
echo "Suggestion: Run - flake8 ." | ||
echo "" | ||
FAILURE=1 | ||
} | ||
} | ||
|
||
flake8-check | ||
exit $FAILURE |