MCPcopy
hub / github.com/tirth8205/code-review-graph / _load_ignore_patterns

Function _load_ignore_patterns

code_review_graph/incremental.py:354–363  ·  view source on GitHub ↗

Load ignore patterns from .code-review-graphignore file.

(repo_root: Path)

Source from the content-addressed store, hash-verified

352
353
354def _load_ignore_patterns(repo_root: Path) -> list[str]:
355 """Load ignore patterns from .code-review-graphignore file."""
356 patterns = list(DEFAULT_IGNORE_PATTERNS)
357 ignore_file = repo_root / ".code-review-graphignore"
358 if ignore_file.exists():
359 for line in ignore_file.read_text(encoding="utf-8", errors="replace").splitlines():
360 line = line.strip()
361 if line and not line.startswith("#"):
362 patterns.append(line)
363 return patterns
364
365
366def _should_ignore(path: str, patterns: list[str]) -> bool:

Callers 5

collect_all_filesFunction · 0.85
incremental_updateFunction · 0.85
watchFunction · 0.85

Calls

no outgoing calls

Tested by 2