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

Function is_valid_include_path

ci/lint_cpp_rs/src/lib.rs:2441–2451  ·  view source on GitHub ↗
(include_path: &str)

Source from the content-addressed store, hash-verified

2439}
2440
2441fn is_valid_include_path(include_path: &str) -> bool {
2442 if is_top_level_include(include_path) || is_external_sdk_header(include_path) {
2443 return true;
2444 }
2445 if banned_subpath_replacement(include_path).is_some() {
2446 return false;
2447 }
2448 VALID_INCLUDE_PREFIXES
2449 .iter()
2450 .any(|prefix| include_path.starts_with(prefix))
2451}
2452
2453fn is_relative_include_path(include_path: &str) -> bool {
2454 include_path.starts_with("./") || include_path.starts_with("../")

Callers 1

check_file_contentMethod · 0.70

Calls 5

is_top_level_includeFunction · 0.70
is_external_sdk_headerFunction · 0.70
anyMethod · 0.65
starts_withMethod · 0.45

Tested by

no test coverage detected