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

Function callsIn

__tests__/rust-go-call-shape.test.ts:77–80  ·  view source on GitHub ↗
(file: string, fn: string)

Source from the content-addressed store, hash-verified

75});
76
77const callsIn = (file: string, fn: string): string[] => {
78 const node = cg.getNodesInFile(file).find((n) => n.name === fn)!;
79 return cg.getOutgoingEdges(node.id).filter((e) => e.kind === 'calls').map((e) => cg.getNode(e.target)!.qualifiedName);
80};
81
82describe('Rust and Go call shapes', () => {
83 it('Rust: bare never a method, std chain names need their receiver, project chain names keep theirs', () => {

Callers 1

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getNodesInFileMethod · 0.65
getOutgoingEdgesMethod · 0.45

Tested by

no test coverage detected