MCPcopy Create free account
hub / github.com/FastLED/FastLED / banned_header_matches_exception

Function banned_header_matches_exception

ci/lint_cpp_rs/src/lib.rs:2628–2634  ·  view source on GitHub ↗
(file_path: &str, header: &str)

Source from the content-addressed store, hash-verified

2626}
2627
2628fn 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
2636fn last_dot_extension(path: &str) -> &str {
2637 path.rsplit('.').next().unwrap_or(path)

Callers 1

check_file_contentMethod · 0.85

Calls 3

normalize_pathFunction · 0.70
anyMethod · 0.65
ends_withMethod · 0.45

Tested by

no test coverage detected