Find all C++ source and header files in the project.
()
| 25 | |
| 26 | |
| 27 | def find_cpp_files() -> List[Path]: |
| 28 | """Find all C++ source and header files in the project.""" |
| 29 | project_dir = Path(__file__).parent.parent |
| 30 | extensions = {".h", ".hpp", ".cc", ".cpp", ".cxx"} |
| 31 | exclude_dirs = {"build", "vcpkg_installed", ".cache", ".git", "third_party"} |
| 32 | |
| 33 | files = [] |
| 34 | for ext in extensions: |
| 35 | for file in project_dir.rglob(f"*{ext}"): |
| 36 | # Skip files in excluded directories |
| 37 | if any(excluded in file.parts for excluded in exclude_dirs): |
| 38 | continue |
| 39 | files.append(file) |
| 40 | |
| 41 | return sorted(files) |
| 42 | |
| 43 | |
| 44 | def check_file_format(file: Path) -> bool: |