(file_path: &str, include_path: &str)
| 2455 | } |
| 2456 | |
| 2457 | fn header_exists_for_file(file_path: &str, include_path: &str) -> bool { |
| 2458 | if is_relative_include_path(include_path) || is_external_sdk_header(include_path) { |
| 2459 | return true; |
| 2460 | } |
| 2461 | |
| 2462 | let normalized_path = normalize_path(file_path); |
| 2463 | let project_root = if let Some(index) = normalized_path.find("/src/") { |
| 2464 | PathBuf::from(&normalized_path[..index]) |
| 2465 | } else { |
| 2466 | PathBuf::from(".") |
| 2467 | }; |
| 2468 | |
| 2469 | project_root.join("src").join(include_path).exists() |
| 2470 | } |
| 2471 | |
| 2472 | fn typo_include_suggestion(include_path: &str) -> Option<&'static str> { |
| 2473 | TYPO_INCLUDE_PREFIXES |
no test coverage detected