MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / buildDefaultIgnore

Function buildDefaultIgnore

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

Source from the content-addressed store, hash-verified

294 * it project code; the explicit `.gitignore` negation is the only opt-in).
295 */
296export function buildDefaultIgnore(rootDir: string): Ignore {
297 const ig = ignore().add(DEFAULT_IGNORE_PATTERNS);
298 const rootGitignore = path.join(rootDir, '.gitignore');
299 if (fs.existsSync(rootGitignore)) ig.add(readGitignorePatterns(rootGitignore));
300 return ig;
301}
302
303/**
304 * 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.45

Tested by

no test coverage detected