Walk the repo and collect files of interest, pruning skip dirs.
(root: Path)
| 70 | |
| 71 | |
| 72 | def _collect_files(root: Path) -> list[str]: |
| 73 | """Walk the repo and collect files of interest, pruning skip dirs.""" |
| 74 | files: list[str] = [] |
| 75 | for dirpath, dirnames, filenames in os.walk(root): |
| 76 | # In-place prune |
| 77 | dirnames[:] = [ |
| 78 | d for d in dirnames if d not in _SKIP_DIRS and not d.startswith(".build") |
| 79 | ] |
| 80 | for name in filenames: |
| 81 | if name.endswith(_INTEREST_SUFFIXES): |
| 82 | files.append(os.path.join(dirpath, name)) |
| 83 | files.sort() |
| 84 | return files |
| 85 | |
| 86 | |
| 87 | def _collect_violations( |
no test coverage detected