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

Function find_cpp_files

cpp_lint.py:17–29  ·  view source on GitHub ↗

Find all C++ source and header files, excluding specified directories.

(root_dir: Path, exclude_dirs: Set[str])

Source from the content-addressed store, hash-verified

15
16
17def find_cpp_files(root_dir: Path, exclude_dirs: Set[str]) -> List[Path]:
18 """Find all C++ source and header files, excluding specified directories."""
19 cpp_extensions = {'.cpp', '.h', '.hpp', '.cc', '.cxx', '.ino'}
20 cpp_files: List[Path] = []
21
22 for ext in cpp_extensions:
23 for file_path in root_dir.rglob(f'*{ext}'):
24 # Check if any parent directory should be excluded
25 if any(excluded in file_path.parts for excluded in exclude_dirs):
26 continue
27 cpp_files.append(file_path)
28
29 return cpp_files
30
31
32def check_relative_includes(file_path: Path) -> List[Tuple[int, str]]:

Callers 1

mainFunction · 0.85

Calls 2

anyFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected