Skip to content

Commit ae896c3

Browse files
committed
Prevent spaces in news entry paths
Thanks to https://adamj.eu/tech/2024/01/24/pre-commit-fail-hook/
1 parent 6870eb3 commit ae896c3

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.pre-commit-config.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,22 @@ repos:
5757
args: [--enable=default-role]
5858
files: ^Doc/|^Misc/NEWS.d/
5959

60+
- repo: local
61+
hooks:
62+
- id: blurb-no-space-c-api
63+
name: Check C API news entries
64+
language: fail
65+
entry: Space found in path, move to Misc/NEWS.d/next/C_API/
66+
files: Misc/NEWS.d/next/C API/20.*.rst
67+
68+
- repo: local
69+
hooks:
70+
- id: blurb-no-space-core-and-builtins
71+
name: Check Core and Builtins news entries
72+
language: fail
73+
entry: Space found in path, move to Misc/NEWS.d/next/Core_and_Builtins/
74+
files: Misc/NEWS.d/next/Core and Builtins/20.*.rst
75+
6076
- repo: meta
6177
hooks:
6278
- id: check-hooks-apply

0 commit comments

Comments
 (0)