pub fn is_documentation(file: impl AsRef<Path>, matcher: &RegexSet) -> boolExpand description
Checks if a file is documentation by checking if it matches any of the documentation rules.
§Example
ⓘ
use std::path::PathBuf;
use regex::RegexSet;
use linguist::utils::is_documentation;
let rules = RegexSet::new(linguist::utils::DOCS).unwrap();
let path = PathBuf::from("/foo/docs");
assert!(is_documentation(path, &rules));