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

Function addLocal

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

Source from the content-addressed store, hash-verified

736 const projectRoots = new Set<string>(['']);
737 const localRoots = new Map<string, string>();
738 const addLocal = (root: string, reach: string): void => {
739 const prior = localRoots.get(root);
740 // Two claims on one root: the wider reach wins.
741 if (prior === undefined || isWithin(prior, reach)) localRoots.set(root, reach);
742 };
743 for (const dir of packageDirs) {
744 let top = dir;
745 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