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

Function addLocal

src/resolution/import-resolver.ts:715–719  ·  view source on GitHub ↗
(root: string, reach: string)

Source from the content-addressed store, hash-verified

713 const projectRoots = new Set<string>(['']);
714 const localRoots = new Map<string, string>();
715 const addLocal = (root: string, reach: string): void => {
716 const prior = localRoots.get(root);
717 // Two claims on one root: the wider reach wins.
718 if (prior === undefined || isWithin(prior, reach)) localRoots.set(root, reach);
719 };
720 for (const dir of packageDirs) {
721 let top = dir;
722 while (top && packageDirs.has(parentDir(top))) top = parentDir(top);

Callers 1

buildPythonModuleIndexFunction · 0.85

Calls 3

isWithinFunction · 0.70
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected