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

Function _extract_included_filenames

ci/lint_cpp/is_header_include_checker.py:88–97  ·  view source on GitHub ↗

Extract the basename of every #include'd file.

(lines: list[str])

Source from the content-addressed store, hash-verified

86
87
88def _extract_included_filenames(lines: list[str]) -> set[str]:
89 """Extract the basename of every #include'd file."""
90 includes: set[str] = set()
91 for line in lines:
92 m = _INCLUDE_RE.match(line)
93 if m:
94 inc_path = m.group(1)
95 inc_name = inc_path.rsplit("/", 1)[-1]
96 includes.add(inc_name)
97 return includes
98
99
100class IsHeaderIncludeChecker(FileContentChecker):

Callers 7

test_quoted_includeMethod · 0.90
test_angle_includeMethod · 0.90
test_path_includeMethod · 0.90
test_is_platformMethod · 0.90
check_file_contentMethod · 0.85

Calls 2

setClass · 0.50
addMethod · 0.45

Tested by 6

test_quoted_includeMethod · 0.72
test_angle_includeMethod · 0.72
test_path_includeMethod · 0.72
test_is_platformMethod · 0.72