From b4ba893a8c9a3b81b22cb3980205236aa40ae2e0 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Fri, 22 Aug 2025 09:29:15 -0500 Subject: [PATCH] Fix the pre-commit `files` regex pattern The bare `.` matches any single character, which allowed for a file named e.g. `CITATION-cff` to match in an external repo, but then cffconvert would throw an error that `CITATION.cff` could not be found. This is fixed by escaping the `.` in the `files` regex pattern so that only a file named exactly `CITATION.cff` will match. --- .pre-commit-hooks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index d846a013..ffcce523 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -3,7 +3,7 @@ description: Runs `cffconvert --validate`. entry: cffconvert --validate language: python - files: ^CITATION.cff$ + files: ^CITATION\.cff$ pass_filenames: false types: [text] require_serial: true