(file_path: &str, header: &str)
| 2626 | } |
| 2627 | |
| 2628 | fn banned_header_matches_exception(file_path: &str, header: &str) -> bool { |
| 2629 | let normalized = normalize_path(file_path); |
| 2630 | BANNED_HEADER_EXCEPTIONS |
| 2631 | .iter() |
| 2632 | .filter(|(exception_header, _)| *exception_header == header) |
| 2633 | .any(|(_, pattern)| normalized == *pattern || normalized.ends_with(&format!("/{pattern}"))) |
| 2634 | } |
| 2635 | |
| 2636 | fn last_dot_extension(path: &str) -> &str { |
| 2637 | path.rsplit('.').next().unwrap_or(path) |
no test coverage detected