[scripts/pre-commit] detect debug 'elif' statements

This commit is contained in:
Mike Fährmann
2025-07-28 18:01:10 +02:00
parent 7faa46b90f
commit 0a7546201c

View File

@@ -19,9 +19,7 @@ A=$?
# -----------------------------------------------------------------------------
DEBUG="$(grep --recursive --line-number \
--exclude-dir='docs' \
--regexp='\bif [01]:' \
--regexp='\bif [01] and ' \
--regexp='\bif [01] or ' \
--regexp='\b\(el\)\?if [01]\(:\| and \| or \)' \
--regexp='\band 0\b' \
--regexp='\bor 1\b' \
--regexp='[[:digit:]]/0\b' \