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

Method scanFile

src/resolution/index.ts:989–997  ·  view source on GitHub ↗

The text a walk over the indexed files reads: see ResolutionContext.scanFile.

(filePath: string)

Source from the content-addressed store, hash-verified

987
988 /** The text a walk over the indexed files reads: see ResolutionContext.scanFile. */
989 private scanFile(filePath: string): string | null {
990 if (this.fileCache.has(filePath)) return this.fileCache.get(filePath) ?? null;
991 try {
992 const source = readSourceText(path.join(this.projectRoot, filePath), 'latin1');
993 return source === null ? null : withoutLongRuns(source);
994 } catch {
995 return null;
996 }
997 }
998
999 /**
1000 * Create the resolution context

Callers 1

createContextMethod · 0.95

Calls 5

readSourceTextFunction · 0.90
withoutLongRunsFunction · 0.90
hasMethod · 0.80
getMethod · 0.65
joinMethod · 0.45

Tested by

no test coverage detected