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

Function header_exists

ci/lint_cpp/include_paths_checker.py:294–306  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

292
293
294def 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
309def get_typo_suggestion(include_path: str) -> str | None:

Callers 1

check_file_contentMethod · 0.85

Calls 2

is_relative_pathFunction · 0.85
is_external_sdk_headerFunction · 0.70

Tested by

no test coverage detected