jcloude/press/scripts/mypy_line_count_check.sh
2025-12-23 20:48:07 +08:00

12 lines
222 B
Bash
Executable File

#!/bin/bash
line_count=$(dmypy run jcloude | wc -l)
MAX_ERRORS=813
if [ "$line_count" -gt $MAX_ERRORS ]; then
echo "mypy shows $line_count errors, which exceeds the limit of $MAX_ERRORS."
dmypy run "$@"
exit 1
fi