Skip to content

Allow colons in CODEOWNERS patterns#52

Open
laserlemon wants to merge 1 commit into
hmarr:mainfrom
laserlemon:laserlemon-allow-colon-patterns
Open

Allow colons in CODEOWNERS patterns#52
laserlemon wants to merge 1 commit into
hmarr:mainfrom
laserlemon:laserlemon-allow-colon-patterns

Conversation

@laserlemon

@laserlemon laserlemon commented Jul 14, 2026

Copy link
Copy Markdown

Hey Harry ol' buddy ol' pal! 💛

Summary

  • allow : as a literal CODEOWNERS pattern character
  • add focused parser and matcher regressions for colon-containing patterns

Problem

isPatternChar omitted colons, causing otherwise valid CODEOWNERS patterns to fail parsing with an unexpected-character error. The matcher already treats colons literally, so adding : to the parser whitelist is sufficient.

Why

GitHub's CODEOWNERS validator API allows directory/file paths containing : characters, but this library does not.

Validation

  • go test ./...
  • go vet ./...
  • go build ./cmd/codeowners

Treat colons as literal pattern characters and cover parsing and matching with a real-world rule.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 47810418-339a-4a4b-ad02-d060059420ce
@laserlemon laserlemon force-pushed the laserlemon-allow-colon-patterns branch from b9eabab to dfe70d2 Compare July 14, 2026 17:39
@laserlemon laserlemon marked this pull request as ready for review July 14, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant