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

Function get_banned_subpath_replacement

ci/lint_cpp/include_paths_checker.py:248–256  ·  view source on GitHub ↗

Check if the include uses a banned internal subpath. Returns the corrected path if banned, None otherwise.

(include_path: str)

Source from the content-addressed store, hash-verified

246
247
248def get_banned_subpath_replacement(include_path: str) -> str | None:
249 """Check if the include uses a banned internal subpath.
250
251 Returns the corrected path if banned, None otherwise.
252 """
253 for banned_prefix, replacement_prefix in BANNED_INTERNAL_SUBPATHS.items():
254 if include_path.startswith(banned_prefix):
255 return replacement_prefix + include_path[len(banned_prefix) :]
256 return None
257
258
259def is_valid_include_path(include_path: str) -> bool:

Callers 3

is_valid_include_pathFunction · 0.85
check_file_contentMethod · 0.85
apply_fixesFunction · 0.85

Calls 1

itemsMethod · 0.80

Tested by

no test coverage detected