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

Function calls

__tests__/cpp-test-fixture-call.test.ts:49–55  ·  view source on GitHub ↗

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

(cg: CodeGraph, caller: string, file?: string)

Source from the content-addressed store, hash-verified

47
48/** `calls` callees of a function or method, as `qualifiedName @confidence`, one per call site. */
49function calls(cg: CodeGraph, caller: string, file?: string): string[] {
50 return cg
51 .getCallees(callable(cg, caller, file).id)
52 .filter((r) => r.edge.kind === 'calls')
53 .map((r) => `${r.node.qualifiedName} @${(r.edge.metadata as { confidence?: number } | undefined)?.confidence}`)
54 .sort();
55}
56
57/** `calls` callees as `qualifiedName by resolvedBy`. */
58function resolvers(cg: CodeGraph, caller: string): string[] {

Callers 1

Calls 3

mapMethod · 0.80
callableFunction · 0.70
getCalleesMethod · 0.45

Tested by

no test coverage detected