From 0a7546201c430388f34e8a953abab38ba2ca48a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 28 Jul 2025 18:01:10 +0200 Subject: [PATCH] [scripts/pre-commit] detect debug 'elif' statements --- scripts/pre-commit | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/pre-commit b/scripts/pre-commit index 36245571..5715b9ef 100755 --- a/scripts/pre-commit +++ b/scripts/pre-commit @@ -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' \