ci(pre-commit): refuse CLAUDE.md in any letter case
The refuse-claude-md pattern was case-sensitive, so claude.md or CLAUDE.MD passed it, yet a case-insensitive file system serves either as CLAUDE.md. Match with the inline (?i) flag. The hook config is a ci image input, so the ci image moves from 0.2.37 to 0.2.38. Assisted-by: Claude Code
This commit is contained in:
1 parent
ff000857a9
commit
4f29901a80
2 files changed
+4
-3
No files matched your search
@@ -130,10 +130,11 @@ repos:
|
||||
# the failure is silent: the agent gets no guidance and no error.
|
||||
- id: refuse-claude-md
|
||||
name: Refuse CLAUDE.md files
|
||||
description: refuse CLAUDE.md, CLAUDE.local.md and .claude/CLAUDE.md at any depth
|
||||
description: refuse CLAUDE.md, CLAUDE.local.md and .claude/CLAUDE.md at any depth, in any case
|
||||
entry: a CLAUDE.md file makes Claude Code ignore every AGENTS.md; delete it
|
||||
language: fail
|
||||
files: (^|/)(\.claude/)?CLAUDE(\.local)?\.md$
|
||||
# Any letter case: a case-insensitive file system serves claude.md as CLAUDE.md.
|
||||
files: (?i)(^|/)(\.claude/)?claude(\.local)?\.md$
|
||||
stages: ['pre-commit']
|
||||
|
||||
- repo: meta
|
||||
|
||||
Reference in new issue
Block a user