Documentation
¶
Overview ¶
Package pathfilter matches repository-relative paths against exclusion patterns, for the governance checks a consuming repository configures (ADR-0179).
It exists because the exclusion set was the last piece of lint policy still living as copied shell. A consumer repository carried it as a `grep -Ev` regex duplicated between its lint script and its editor hook — two copies of one policy, in a language with no way to share them, in the layer this ADR exists to stop copying.
The pattern syntax is deliberately smaller than a regex, because the thing being expressed is small:
CLAUDE.md a bare name matches that basename anywhere *.out.md a bare glob matches the basename anywhere attic/ a trailing slash matches that directory at any depth doc/gen/ …including a nested one, e.g. public/x/doc/gen/y.md doc/adr/*.md a pattern with a separator matches the whole relative path
Anchoring differs from a regex on purpose: "attic/" excludes an attic directory wherever it sits, which is what a repository means by it, and what the shell versions were approximating with alternation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var PackageProps = packageprops.Props{ WASMWASI: packageprops.WASMCompiles, WASMJS: packageprops.WASMCompiles, WASMFreestanding: packageprops.WASMCompiles, }
PackageProps records this package's curated properties (ADR-0080).
Functions ¶
This section is empty.
Types ¶
type Matcher ¶
type Matcher struct {
// contains filtered or unexported fields
}
Matcher tests paths against a set of exclusion patterns.
The zero value matches nothing, which is the right default: a check with no configured exclusions examines everything.