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

Function buildScopeIgnore

src/extraction/index.ts:695–705  ·  view source on GitHub ↗
(rootDir: string, embeddedRoots?: Iterable<string>)

Source from the content-addressed store, hash-verified

693 * skip rediscovery; otherwise they're discovered here (the watcher path).
694 */
695export function buildScopeIgnore(rootDir: string, embeddedRoots?: Iterable<string>): ScopeIgnore {
696 const roots = embeddedRoots ? [...embeddedRoots] : discoverEmbeddedRepoRoots(rootDir);
697 const include = loadIncludeMatcher(rootDir);
698 return new ScopeIgnore(
699 buildDefaultIgnore(rootDir),
700 roots.map((root) => ({ root, matcher: buildDefaultIgnore(path.join(rootDir, root)) })),
701 loadExcludeMatcher(rootDir),
702 include,
703 include ? includeStaticRoots(loadIncludePatterns(rootDir)) : [],
704 );
705}
706
707/**
708 * Whether an embedded repo found as a tracked gitlink (mode 160000, #1031/#1033)

Callers 5

startMethod · 0.90
extraction.test.tsFile · 0.90
getGitVisibleFilesFunction · 0.85

Calls 7

loadIncludePatternsFunction · 0.90
loadIncludeMatcherFunction · 0.85
buildDefaultIgnoreFunction · 0.85
loadExcludeMatcherFunction · 0.85
includeStaticRootsFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected