MCPcopy
hub / github.com/colbymchenry/codegraph / loadExcludeMatcher

Function loadExcludeMatcher

src/extraction/index.ts:320–323  ·  view source on GitHub ↗

* Matcher for the project's `codegraph.json` `exclude` patterns — paths to keep * OUT of the index even when git-tracked, which `.gitignore` cannot do (#999). * The escape hatch for a committed vendor/theme/SDK directory. Returns `null` * when nothing is excluded (the zero-config default → no ove

(rootDir: string)

Source from the content-addressed store, hash-verified

318 * everywhere). Built once per scan/sync/scope operation from the scan root.
319 */
320function loadExcludeMatcher(rootDir: string): Ignore | null {
321 const patterns = loadExcludePatterns(rootDir);
322 return patterns.length > 0 ? ignore().add(patterns) : null;
323}
324
325/**
326 * `git ls-files --directory` collapses a wholly-untracked/ignored directory into

Callers 3

buildScopeIgnoreFunction · 0.85
getGitChangedFilesFunction · 0.85
scanDirectoryWalkFunction · 0.85

Calls 1

loadExcludePatternsFunction · 0.90

Tested by

no test coverage detected