diff options
| author | Dave Hibberd <hibby@debian.org> | 2024-02-24 13:47:27 +0000 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2024-02-24 13:47:27 +0000 |
| commit | fc438e6a84402e621877f6c30097442af46f122b (patch) | |
| tree | 7a6ca4af4159368f92d10c6c932c4b5e662715aa /tools/check_commit.sh | |
| parent | 99bce70f3ca5cea0eb28f5158cfa00803cf6a19a (diff) | |
New upstream version 20240224upstream/20240224
Diffstat (limited to 'tools/check_commit.sh')
| -rwxr-xr-x | tools/check_commit.sh | 8 |
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 |
