Skip to content

[parse] allow Next.js route-group parentheses - #2

Merged
lukealbao merged 1 commit into
lukealbao:mainfrom
DorianListens:parse-allow-parentheses
Apr 29, 2026
Merged

lukealbao merged 1 commit into
lukealbao:mainfrom
DorianListens:parse-allow-parentheses

Conversation

@DorianListens

Copy link
Copy Markdown
Collaborator

Summary

  • Permit ( and ) in isPatternChar so CODEOWNERS patterns can match Next.js route-group folders like src/app/(nonauth)/forgot/**/*.
  • Adds a parse test covering the route-group case.

Follows the same precedent as the recent square-brackets change (dbad96a) for Next.js dynamic-param folders.

Test plan

  • go test ./... passes
  • Verified co lint against a real CODEOWNERS file containing (nonauth) no longer errors at the offending line.

Patterns like src/app/(nonauth)/forgot/**/* (Next.js route groups)
were rejected with "unexpected character '('". Permit ( and ) in
isPatternChar, matching the existing brackets exception (dbad96a).
@DorianListens DorianListens self-assigned this Apr 28, 2026
@DorianListens
DorianListens marked this pull request as ready for review April 28, 2026 16:31
@DorianListens
DorianListens requested a review from lukealbao April 28, 2026 16:31

@lukealbao lukealbao left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @DorianListens 🚀

@lukealbao
lukealbao merged commit b9d9912 into lukealbao:main Apr 29, 2026
2 checks passed
@dandean

dandean commented Apr 30, 2026

Copy link
Copy Markdown

Thank you!

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.

3 participants