Skip to main content

missing_unit_tests

Function missing_unit_tests 

Source
pub fn missing_unit_tests(
    root: impl AsRef<Path>,
    language: Language,
    exempt: &BTreeSet<String>,
) -> Result<Vec<PathBuf>>
Expand description

Walk root recursively and return every source file (for language) that has no colocated unit test, sorted for deterministic output.

A file that is itself a test is never a subject; an empty/comment-only file holds no logic and is never a subject; a file whose root-relative path is in exempt is a deliberate, reason-required omission. Every other source file must have its colocated test sibling. exempt holds the colocated-test-rule paths resolved from config (crate::config::resolve_exempt). Returns an error if the tree under root cannot be read.