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

Function collectIncludedFilesForRoot

src/extraction/index.ts:867–872  ·  view source on GitHub ↗

* The included source files (`codegraph.json` `include`) for a scan root, or an * empty set when nothing is force-included. Centralizes loading the matcher, * roots, exclude, and overrides so both enumeration paths (git and filesystem * walk) add the same files.

(rootDir: string)

Source from the content-addressed store, hash-verified

865 * walk) add the same files.
866 */
867function collectIncludedFilesForRoot(rootDir: string): Set<string> {
868 const include = loadIncludeMatcher(rootDir);
869 if (!include) return new Set();
870 const roots = includeStaticRoots(loadIncludePatterns(rootDir));
871 return collectIncludedFiles(rootDir, include, loadExcludeMatcher(rootDir), roots, loadExtensionOverrides(rootDir));
872}
873
874/**
875 * `git ls-files --directory` collapses a wholly-untracked/ignored directory into

Callers 3

getGitVisibleFilesFunction · 0.85
scanDirectoryWalkFunction · 0.85
includedFileChangesMethod · 0.85

Calls 6

loadIncludePatternsFunction · 0.90
loadExtensionOverridesFunction · 0.90
loadIncludeMatcherFunction · 0.85
includeStaticRootsFunction · 0.85
collectIncludedFilesFunction · 0.85
loadExcludeMatcherFunction · 0.85

Tested by

no test coverage detected