summaryrefslogtreecommitdiff
path: root/tools/check_commit.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/check_commit.sh')
-rwxr-xr-xtools/check_commit.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/check_commit.sh b/tools/check_commit.sh
index 84b69db..4a6d68d 100755
--- a/tools/check_commit.sh
+++ b/tools/check_commit.sh
@@ -34,7 +34,7 @@ if grep -E '\wfuture\w' added_lines; then
fail No new uses of future
fi
-if grep -E '(from|import).*past' added_lines; then
+if grep -E '(from|import).*past(?!e)' added_lines; then
fail Use of past library not allowed
fi
@@ -46,6 +46,10 @@ if grep -E "[^_]_\([^\"']" added_lines; then
fail 'Translated strings must be literals!'
fi
+if grep -E "eval\(" added_lines; then
+ fail 'Use of eval() is dangerous and not permitted!'
+fi
+
if git diff ${BASE}.. 'tools/cpep8.manifest' | tail -n +5 | grep -q '^+'; then
fail 'Do not add new files to cpep8.manifest; no longer needed'
fi
@@ -98,4 +102,6 @@ for nf in $added_py; do
done
done
+rm -f added_lines license_lines
+
exit $RETCODE