Skip to main content

Module guards

Module guards 

Source
Expand description

Guards: named checks over any file in the repository and over commit messages, such as the gate that keeps internal names out of a public package.

Re-exports§

pub use range::GuardRange;

Modules§

range
What a guard looks at: the index, the commits about to be pushed, or the whole tree.
secrets
Built-in secret patterns. Deliberately narrow: each one is a format with a fixed prefix or header, so a hit is almost always real.
terms
Denied terms: gathered from the guard, a file outside the repository, or an environment variable, and matched case-insensitively. Terms are never printed in full.

Functions§

run
Runs the named guards (all of them when names is empty). A guard without an explicit range uses its own default; a guard with a baseline reports only hits the baseline does not hold.
write_baselines
Measures each named guard over the whole tree and writes its baseline file.