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

Function calls

__tests__/cpp-namespace-qualifier.test.ts:47–53  ·  view source on GitHub ↗

`calls` callees of a function or method, as `kind qualifiedName (file)`.

(cg: CodeGraph, caller: string)

Source from the content-addressed store, hash-verified

45
46/** `calls` callees of a function or method, as `kind qualifiedName (file)`. */
47function calls(cg: CodeGraph, caller: string): string[] {
48 return cg
49 .getCallees(callable(cg, caller).id)
50 .filter((r) => r.edge.kind === 'calls')
51 .map((r) => `${r.node.kind} ${r.node.qualifiedName} (${r.node.filePath})`)
52 .sort();
53}
54
55const lines = (...l: string[]): string => [...l, ''].join('\n');
56

Callers 1

Calls 3

mapMethod · 0.80
callableFunction · 0.70
getCalleesMethod · 0.45

Tested by

no test coverage detected