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

Function addLocal

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

Source from the content-addressed store, hash-verified

729 const projectRoots = new Set<string>(['']);
730 const localRoots = new Map<string, string>();
731 const addLocal = (root: string, reach: string): void => {
732 const prior = localRoots.get(root);
733 // Two claims on one root: the wider reach wins.
734 if (prior === undefined || isWithin(prior, reach)) localRoots.set(root, reach);
735 };
736 for (const dir of packageDirs) {
737 let top = dir;
738 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