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

Function is_external_sdk_header

ci/lint_cpp/include_paths_checker.py:201–221  ·  view source on GitHub ↗

Check if the include path is from an external SDK. External SDK headers (like ESP-IDF, Pico SDK, FreeRTOS, Arduino) are allowed to be included with their original paths.

(include_path: str)

Source from the content-addressed store, hash-verified

199
200
201def is_external_sdk_header(include_path: str) -> bool:
202 """Check if the include path is from an external SDK.
203
204 External SDK headers (like ESP-IDF, Pico SDK, FreeRTOS, Arduino)
205 are allowed to be included with their original paths.
206 """
207 # First check if it's definitely an SDK header
208 for prefix in EXTERNAL_SDK_PREFIXES:
209 if include_path.startswith(prefix):
210 return True
211
212 # For ambiguous prefixes (avr/, arm/), check if it looks like FastLED code
213 for prefix in AMBIGUOUS_PREFIXES:
214 if include_path.startswith(prefix):
215 # If it looks like FastLED code, it's NOT an SDK header
216 if looks_like_fastled_code(include_path):
217 return False
218 # Otherwise, assume it's an SDK header (e.g., <avr/io.h>)
219 return True
220
221 return False
222
223
224def is_fastled_platform_relative(include_path: str) -> bool:

Callers 2

is_valid_include_pathFunction · 0.70
header_existsFunction · 0.70

Calls 1

looks_like_fastled_codeFunction · 0.85

Tested by

no test coverage detected