Skip to main content

Module pattern

Module pattern 

Source
Expand description

Fast CODEOWNERS pattern matching with shape-based specialization.

Every CODEOWNERS pattern is classified at compile time into one of a handful of shapes, and each shape gets its own matcher. Typical monorepo CODEOWNERS files are ~80% *.ext extension patterns and directory prefixes — those get raw ends_with / starts_with on bytes, no glob engine involvement.

For the minority of truly globby patterns (src/**/*.rs), we fall through to fast_glob.

Enums§

CompiledPattern
A CODEOWNERS pattern, pre-processed for repeated fast matching.

Functions§

pattern_matches
Simple glob pattern matching for CODEOWNERS patterns
pattern_subsumes
Check if pattern a is subsumed by pattern b (i.e., everything a matches, b also matches). If true, and b comes after a in CODEOWNERS, then a is a dead rule.