Skip to main content

path_is_inert

Function path_is_inert 

Source
pub fn path_is_inert(path: &str) -> bool
Expand description

Whether a path cannot change what a build-and-test command observes.

Deliberately a short, conservative allowlist rather than a guess at what matters: documentation, licences, and forge bookkeeping. Everything else — including Cargo.toml, build.rs, and any .txt that might be a test fixture — counts as relevant, because the cost of wrongly skipping a merge is a semantic conflict that never enters the corpus, while the cost of wrongly keeping one is three builds.

§Examples

use choir_bridge::queue::path_is_inert;

// Documentation and forge bookkeeping cannot move a test result.
assert!(path_is_inert("README.md"));
assert!(path_is_inert("docs/operating/limits.md"));
assert!(path_is_inert(".github/workflows/ci.yml"));

// Everything else counts, including the files that only look inert.
assert!(!path_is_inert("src/lib.rs"));
assert!(!path_is_inert("Cargo.toml"));
assert!(!path_is_inert("tests/fixtures/input.txt"));