Find all C++ source files in the project.
()
| 73 | |
| 74 | |
| 75 | def find_cpp_files() -> List[Path]: |
| 76 | """Find all C++ source files in the project.""" |
| 77 | project_dir = Path(__file__).parent.parent |
| 78 | extensions = {".cc", ".cpp", ".cxx"} |
| 79 | exclude_dirs = {"build", "vcpkg_installed", ".cache", ".git", "third_party"} |
| 80 | |
| 81 | files = [] |
| 82 | for ext in extensions: |
| 83 | for file in project_dir.rglob(f"*{ext}"): |
| 84 | # Skip files in excluded directories |
| 85 | if any(excluded in file.parts for excluded in exclude_dirs): |
| 86 | continue |
| 87 | files.append(file) |
| 88 | |
| 89 | return sorted(files) |
| 90 | |
| 91 | |
| 92 | async def lint_file( |