Functions | |
| list | enumerate_repository_files (Path repo_root, str suffix="", frozenset skip_dirs=frozenset()) |
| List tracked plus non-ignored untracked files that exist on disk. | |
One git-backed enumeration of the repository's reviewable files. Every documentation scanner needs the same set: files this commit carries, plus non-ignored untracked ones, minus generated scratch. Four scanners each had their own copy, and every copy shared one defect - `git ls-files` reports a path the index still tracks even after the worktree file is deleted, so a scanner would enumerate it and then fail on `read_text()`. Deleting a page is ordinary work, and the constituent audits must keep running against a dirty tree even though `certify-docs` refuses one.
| list repo_files.enumerate_repository_files | ( | Path | repo_root, |
| str | suffix = "", |
||
| frozenset | skip_dirs = frozenset() |
||
| ) |
List tracked plus non-ignored untracked files that exist on disk.
Paths the index tracks but the worktree no longer holds are filtered out: a deletion staged or unstaged is still a deletion, and reading it would raise rather than report a finding.
| [in] | repo_root | Repository root directory. |
| [in] | suffix | Restrict to paths with this suffix, or empty for all files. |
| [in] | skip_dirs | Path components whose presence excludes a file. |
Definition at line 18 of file repo_files.py.