Discover .cpp/.h/.hpp files under source_dir/subdir, return sorted relative paths.
(source_dir: Path, subdir: str)
| 219 | |
| 220 | |
| 221 | def _discover_files_in_dir(source_dir: Path, subdir: str) -> list[str]: |
| 222 | """Discover .cpp/.h/.hpp files under source_dir/subdir, return sorted relative paths.""" |
| 223 | dir_path = source_dir / subdir |
| 224 | if not dir_path.exists(): |
| 225 | return [] |
| 226 | files = sorted( |
| 227 | str(p.relative_to(source_dir)) |
| 228 | for p in dir_path.rglob("*") |
| 229 | if p.suffix in _SOURCE_EXTENSIONS and p.is_file() |
| 230 | ) |
| 231 | return files |
| 232 | |
| 233 | |
| 234 | def get_source_files_hash(source_dir: Path) -> tuple[str, list[str]]: |
no outgoing calls
no test coverage detected