From 1b0d08fc1ea8f815168c7a71b3cb09887e81b314 Mon Sep 17 00:00:00 2001 From: Chris Bachhuber Date: Fri, 5 Jun 2026 10:25:23 -0400 Subject: [PATCH 1/2] docs: check-non-existing-and-duplicate-excludes only supports simple regexes --- .pre-commit-hooks.yaml | 3 +++ README.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 36c9884..3fb339a 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -197,6 +197,9 @@ Background: In a big codebase, the exclude lists can be quite long and it's easy to make a typo or forget to remove an entry when it's no longer needed. This hook helps you to maintain a clean and up to date exclude list. + + Note: This hook deliberately only supports simple |-separated lists of file paths — complex regular expressions are not supported. + Keeping exclusions as plain |-separated paths also makes it easier for humans to maintain an overview of what is excluded. entry: check-useless-exclude-paths-hooks pass_filenames: false always_run: true diff --git a/README.md b/README.md index 9bc467b..1461123 100644 --- a/README.md +++ b/README.md @@ -167,6 +167,9 @@ Check for non existing and duplicate paths in `.pre-commit-config.yaml`. Background: In a big codebase, the exclude lists can be quite long and it's easy to make a typo or forget to remove an entry when it's no longer needed. This hook helps you to maintain a clean and up to date exclude list. +Note: This hook deliberately only supports simple `|`-separated lists of file paths in `exclude` fields — complex regular expressions are not supported. +Keeping exclusions as plain `|`-separated paths also makes it easier for humans to maintain an overview of what is excluded. + ### `print-pre-commit-metrics` Count the number of excludes in `.pre-commit-config.yaml` and print them in json format. From 28097e4d155e7ff265b94abad1f8406508131bb2 Mon Sep 17 00:00:00 2001 From: Chris Bachhuber Date: Fri, 5 Jun 2026 10:27:14 -0400 Subject: [PATCH 2/2] Align --- .pre-commit-hooks.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 3fb339a..20026f5 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -198,8 +198,8 @@ Background: In a big codebase, the exclude lists can be quite long and it's easy to make a typo or forget to remove an entry when it's no longer needed. This hook helps you to maintain a clean and up to date exclude list. - Note: This hook deliberately only supports simple |-separated lists of file paths — complex regular expressions are not supported. - Keeping exclusions as plain |-separated paths also makes it easier for humans to maintain an overview of what is excluded. + Note: This hook deliberately only supports simple `|`-separated lists of file paths in `exclude` fields — complex regular expressions are not supported. + Keeping exclusions as plain `|`-separated paths also makes it easier for humans to maintain an overview of what is excluded. entry: check-useless-exclude-paths-hooks pass_filenames: false always_run: true