Why plausible rules still fail in practice
CODEOWNERS is an ordered policy. GitHub evaluates case-sensitive patterns and uses the last matching rule, so a broad late rule can silently override a carefully placed earlier rule. This auditor preserves the entire matching-line trace, then separates patterns that match nothing in the supplied inventory from patterns that match files but never become the decision.
Location is part of the policy
GitHub searches .github/CODEOWNERS, root CODEOWNERS, then docs/CODEOWNERS, and uses the first file it finds. Choosing a repository folder lets this tool apply that priority and report lower-priority inactive files. A pasted file cannot prove its branch or location, so those facts remain explicitly unverified.
Cleared ownership is different from no match
A later pattern with no owners deliberately clears ownership for matching paths. That is distinct from a file that never matched a valid rule. Both lack a deciding owner, but the path table labels the reason so an intentional exception is not confused with an accidental gap.
Protect the policy itself
GitHub recommends assigning an owner to the CODEOWNERS file or the entire .github directory. When its active location is known, this audit evaluates that path through the same rule engine and warns when it is not owned.
Authoritative confirmation
The precedence, location, file-size, owner, branch-protection, and syntax model follows GitHub’s CODEOWNERS documentation. Confirm highlighted syntax on GitHub itself; its file view and REST API can expose repository-specific errors.
Validation boundary
This is a bounded independent matcher, not GitHub. It does not know the pull request’s actual base branch; query GitHub’s syntax-error API; prove that users or teams exist, are visible, or have explicit write access; evaluate branch protection or rulesets; infer files absent from the supplied inventory; resolve symlinks; inspect submodules; or guarantee that GitHub will request a reviewer. Folder inventory relies on browser directory-selection support and treats selected paths as evidence at that moment.
Frequently asked questions
Why did an earlier matching rule not win?
CODEOWNERS uses last-match-wins precedence. Put the more specific exception after the broader rule that it must override.
Does docs/* cover nested documentation?
No. GitHub documents it as matching direct children such as docs/getting-started.md, not deeper paths. Use /docs/ when the root documentation tree and its descendants should share an owner.
Do all owners on one line have to approve?
No. When code-owner approval is required, approval from any one listed owner satisfies that ownership set.
Can I exclude a directory with !?
No. Negation is unsupported. Add a later matching pattern with no owners to clear ownership for that subtree.