Skip to main content

is_text

Function is_text 

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

True when no code check can fail from a change of the file path. path is relative to the top of the repository.

use hygiene::ci::is_text;

assert!(is_text("docs/src/how-it-works.md"));
assert!(is_text("docs/book.toml"));
assert!(is_text("design/reviews/x.md"));
assert!(is_text("CLAUDE.md"));
assert!(!is_text("crates/riff/src/main.rs"));
assert!(!is_text("crates/riff/README.md"));
assert!(!is_text("justfile"));