Function check_headers_recursively

Source
pub fn check_headers_recursively(
    root: &Path,
    path_predicate: impl Fn(&Path) -> bool,
    header: Header<impl HeaderChecker + 'static>,
    num_threads: usize,
) -> Result<FileResults, CheckHeadersRecursivelyError>
Expand description

Recursively check for header in every file in root that matches path_predicate.

Checking the discovered files is parallelized across num_threads threads.

globset is a useful crate for ignoring unwanted files in path_predicate.

Returns a FileResults object containing the paths without headers detected, and the paths which were not UTF-8 text.