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

Function calls

__tests__/cpp-auto-range-for-receiver.test.ts:52–58  ·  view source on GitHub ↗

`calls` callees of a function or method, as `qualifiedName @confidence`, one per call site.

(cg: CodeGraph, caller: string)

Source from the content-addressed store, hash-verified

50
51/** `calls` callees of a function or method, as `qualifiedName @confidence`, one per call site. */
52function calls(cg: CodeGraph, caller: string): string[] {
53 return cg
54 .getCallees(callable(cg, caller).id)
55 .filter((r) => r.edge.kind === 'calls')
56 .map((r) => `${r.node.qualifiedName} @${(r.edge.metadata as { confidence?: number } | undefined)?.confidence}`)
57 .sort();
58}
59
60const lines = (...text: string[]): string => [...text, ''].join('\n');
61

Calls 3

mapMethod · 0.80
callableFunction · 0.70
getCalleesMethod · 0.45

Tested by

no test coverage detected