Check if a quoted header file exists in src/. Only checks headers that use full paths relative to src/ (not relative paths like "./file.h" and not external SDK headers).
(include_path: str)
| 292 | |
| 293 | |
| 294 | def header_exists(include_path: str) -> bool: |
| 295 | """Check if a quoted header file exists in src/. |
| 296 | |
| 297 | Only checks headers that use full paths relative to src/ (not relative |
| 298 | paths like "./file.h" and not external SDK headers). |
| 299 | """ |
| 300 | # Skip relative paths and external SDK headers |
| 301 | if is_relative_path(include_path) or is_external_sdk_header(include_path): |
| 302 | return True |
| 303 | |
| 304 | # Check if the header exists in src/ |
| 305 | header_file = PROJECT_ROOT / "src" / include_path |
| 306 | return header_file.exists() |
| 307 | |
| 308 | |
| 309 | def get_typo_suggestion(include_path: str) -> str | None: |
no test coverage detected