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

Function inFileEdges

__tests__/dominant-file-window.test.ts:50–56  ·  view source on GitHub ↗

Edges between two symbols of `file`: what the dominant-file ranking counts.

(g: CodeGraph, file: string)

Source from the content-addressed store, hash-verified

48
49/** Edges between two symbols of `file`: what the dominant-file ranking counts. */
50function inFileEdges(g: CodeGraph, file: string): number {
51 return ((g as any).db.db.prepare(`
52 SELECT COUNT(*) AS n FROM edges e
53 JOIN nodes s ON e.source = s.id JOIN nodes t ON e.target = t.id
54 WHERE s.file_path = ? AND t.file_path = ?
55 `).get(file, file) as { n: number }).n;
56}
57
58/** The issue's layout: the app's two busiest files, below `tests` test files that each outrank both. */
59function appWithTests(tests: number): Record<string, string> {

Callers 1

Calls 2

getMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected