diff options
author | xengineering <me@xengineering.eu> | 2024-09-03 19:56:18 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-09-08 17:21:32 +0200 |
commit | 8043151dc8f80bdffaef1e98e1e33acc36bd58d5 (patch) | |
tree | ce5a3a1a4d9b19b3fc23b2d3a4027e26998c9216 /tools | |
parent | 95763696b3a1cbc34c25e8efd701b876a8b76f82 (diff) | |
download | finance-py-8043151dc8f80bdffaef1e98e1e33acc36bd58d5.tar finance-py-8043151dc8f80bdffaef1e98e1e33acc36bd58d5.tar.zst finance-py-8043151dc8f80bdffaef1e98e1e33acc36bd58d5.zip |
tools: Add check_source.sh
This script checks for common programming errors in the Python code of
this repository.
It might be symlinked by `.git/hooks/pre-commit` to make sure those
errors do not end up in the Git history.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/check_source.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/check_source.sh b/tools/check_source.sh new file mode 100755 index 0000000..a401418 --- /dev/null +++ b/tools/check_source.sh @@ -0,0 +1,14 @@ +#!/bin/sh + + +set -euf + + +script="$(realpath "$0")" +tools="$(dirname "$script")" +root="$(dirname "$tools")" + + +black "$root" +mypy --strict "$root" +flake8 "$root" |