Created
January 19, 2024 15:25
-
-
Save mrseanryan/a7d8ed4bfda2f3f6e495bfe719e8d35c to your computer and use it in GitHub Desktop.
Bash script to lint Python code via flake8 - shows how to disable rules.
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
# so future errors halt the script. | |
set -e | |
echo Linting ... | |
# Disable less useful errors | |
# - ref https://www.flake8rules.com/ | |
# | |
# E302 Expected 2 blank lines | |
# E305 Expected 2 blank lines after end of function or class | |
# E501 Line too long (82 > 79 characters) | |
FLAKE8_TO_IGNORE=E302,E305,E501 | |
python -m flake8 --extend-ignore $FLAKE8_TO_IGNORE ../src | |
echo [done] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment