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

Function read

src/graph/dead-code.ts:614–619  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

612 if (readSource) {
613 const sources = new Map<string, string | null>();
614 const read = (file: string): string | null => {
615 if (!sources.has(file)) {
616 sources.set(file, sources.size >= MAX_CORROBORATION_FILES ? null : readSource(file));
617 }
618 return sources.get(file) ?? null;
619 };
620 // The set to search is the declaring file plus everything the index says
621 // reaches into it — the same set a call could have come from. Computed once
622 // per file, not once per candidate.

Callers 3

buildDeadCodeReportFunction · 0.70
fuzzyNamesMethod · 0.50
loweredNodePathsMethod · 0.50

Calls 4

readSourceFunction · 0.85
hasMethod · 0.80
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected