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

Function buildDefaultIgnore

src/extraction/index.ts:281–286  ·  view source on GitHub ↗
(rootDir: string)

Source from the content-addressed store, hash-verified

279 * it project code; the explicit `.gitignore` negation is the only opt-in).
280 */
281export function buildDefaultIgnore(rootDir: string): Ignore {
282 const ig = ignore().add(DEFAULT_IGNORE_PATTERNS);
283 const rootGitignore = path.join(rootDir, '.gitignore');
284 if (fs.existsSync(rootGitignore)) ig.add(readGitignorePatterns(rootGitignore));
285 return ig;
286}
287
288/**
289 * Defaults-only ignore matcher (no root `.gitignore` merged). Used wherever the

Callers 6

extraction.test.tsFile · 0.90
buildScopeIgnoreFunction · 0.85
visitFunction · 0.85
collectGitFilesFunction · 0.85
collectGitStatusFunction · 0.85
scanDirectoryWalkFunction · 0.85

Calls 2

readGitignorePatternsFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected