-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #238 from MightyCreak/chore/add-git-hooks
chore: add pre-commit git hooks to run linters
- Loading branch information
Showing
3 changed files
with
30 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,19 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
txtred='\e[0;31m' | ||
txtbld='\e[1m' | ||
txtrst='\e[0m' | ||
|
||
if ! flake8 src/ po/ | ||
then | ||
echo -e "${txtred}${txtbld}Linter error(s) from flake8${txtrst}" | ||
exit 1 | ||
fi | ||
|
||
if ! mypy src/ po/ | ||
then | ||
echo -e "${txtred}${txtbld}Linter error(s) from mypy${txtrst}" | ||
exit 1 | ||
fi |
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
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