Skip to content
BETAGuardrails are in beta. The library, the configuration format and the CLI command can still change.

Guardrails

ownership

6 guardrails, all at version v1.

GuardrailDefault severityWhat it checks
ownership/catch-all-rulewarningCODEOWNERS declares a rule matching every path, so a file nobody thought about still has an owner.
ownership/codeowners-parseserrorEvery line of CODEOWNERS that is not a comment reads as a rule, so no ownership is silently lost to a line the forge ignores.
ownership/codeowners-presentwarningThe repository carries a CODEOWNERS file naming at least one rule, so every change has somebody to review it.
ownership/no-unowned-ruleserrorNo rule in CODEOWNERS names an empty set of owners, which would take ownership away from everything it matches.
ownership/owners-per-rulewarningEvery rule in CODEOWNERS names at least the minimum owners and no more than the maximum, so review is neither one person's bus factor nor everybody's problem.
ownership/team-ownedwarningEvery rule in CODEOWNERS names at least one team, so ownership survives the people currently in it.

Shared collectors

Every ownership guardrail is handed the facts these collectors gather, and each one may ask for more of its own.

CollectorGathers
codeownersThe CODEOWNERS file the repository carries, read as rules rather than as text: every pattern in file order with the owners it names, how many rules each owner is named by, and the owners that apply to the paths a guardrail asks about, resolved the way GitHub resolves them, where the last rule to match a path is the one that owns it.

Every guardrail in this category is configured the same way, in the guardrails.checks array of buildnote.json. See Configuring guardrails for every option, and Guardrails to search the whole library.

Buildnote Limited
Registered in England and Wales, Reg: 16140412