Skip to main content

Module codeowners

Module codeowners 

Source
Expand description

CODEOWNERS file parser and ownership lookup. CODEOWNERS file parser and ownership lookup.

Parses GitHub/GitLab-style CODEOWNERS files and matches file paths to their owners. Used by --group-by owner to group analysis output by team ownership.

§Pattern semantics

CODEOWNERS patterns follow gitignore-like rules:

  • *.js matches any .js file in any directory
  • /docs/* matches files directly in docs/ (root-anchored)
  • docs/ matches everything under docs/
  • Last matching rule wins
  • First owner on a multi-owner line is the primary owner

Structs§

CodeOwners
Parsed CODEOWNERS file for ownership lookup.

Constants§

UNOWNED_LABEL
Label for files that match no CODEOWNERS rule.

Functions§

directory_group
Extract the first path component for --group-by directory grouping.