From 8043151dc8f80bdffaef1e98e1e33acc36bd58d5 Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 3 Sep 2024 19:56:18 +0200 Subject: 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. --- tools/check_source.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 tools/check_source.sh (limited to 'tools') 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" -- cgit v1.2.3-70-g09d2