(include_path: &str)
| 2439 | } |
| 2440 | |
| 2441 | fn 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 | |
| 2453 | fn is_relative_include_path(include_path: &str) -> bool { |
| 2454 | include_path.starts_with("./") || include_path.starts_with("../") |
no test coverage detected