(self, *patterns: str)
| 211 | return findings |
| 212 | |
| 213 | def git_files(self, *patterns: str) -> list[Path]: |
| 214 | cmd = ["git", "ls-files", *patterns] |
| 215 | result = subprocess.run( |
| 216 | cmd, |
| 217 | cwd=self.repo_root, |
| 218 | check=True, |
| 219 | capture_output=True, |
| 220 | text=True, |
| 221 | ) |
| 222 | paths = [Path(line) for line in result.stdout.splitlines() if line] |
| 223 | if self.project_path is None: |
| 224 | return paths |
| 225 | return [path for path in paths if path == self.project_path or self.project_path in path.parents] |
| 226 | |
| 227 | def check_tracked_ignored_files(self) -> list[Finding]: |
| 228 | result = subprocess.run( |
no test coverage detected