splinter-keep/pre-commit.sh

10 lines
265 B
Bash
Executable File

#!/bin/bash
ERRORS=$(python3 -c "import os; [f for f in os.listdir('./tools') if f.endswith('.py') and os.path.getsize(os.path.join('./tools', f)) > 2048]")
if [ -z "$ERRORS" ]; then
echo "OK"
else
echo "You need to refactor this:"
echo "$ERRORS"
exit 1
fi