From fc438e6a84402e621877f6c30097442af46f122b Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Sat, 24 Feb 2024 13:47:27 +0000 Subject: New upstream version 20240224 --- tools/check_commit.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tools/check_commit.sh') 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 -- cgit v1.2.3