From dbf61e859362aeda69b9f4bf9c80270715375f1e Mon Sep 17 00:00:00 2001 From: James Griffin Date: Sun, 5 Jul 2026 16:12:37 -0300 Subject: [PATCH] Word-bound the no-debug CI grep so method calls like ->add() don't match dd( The unanchored dd\( pattern matched the substring in DateTimeImmutable::add(), failing the check on non-debug code. Co-Authored-By: Claude Fable 5 --- .gitea/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 565a9d3..c14788b 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -97,7 +97,8 @@ jobs: - uses: actions/checkout@v4 - name: Check for debug statements run: | - if grep -rn --include="*.php" -E "(var_dump|var_export|print_r|error_log|dd\(|dump\()" src/; then + # \b keeps method calls like DateTimeImmutable::add() from matching dd(. + if grep -rn --include="*.php" -E "\b(var_dump|var_export|print_r|error_log|dd|dump)\s*\(" src/; then echo "Debug code found in src/ — please remove before merging." exit 1 fi