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

Function callsFrom

__tests__/cpp-translation-unit.test.ts:360–366  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

358
359/** `qualifiedName (file)` of every call the file's symbols make. */
360const callsFrom = (file: string): string[] => {
361 const ids = cg.getNodesInFile(file).map((n) => n.id);
362 return cg.getOutgoingEdgesFrom(ids).filter((e) => e.kind === 'calls').map((e) => {
363 const target = cg.getNode(e.target)!;
364 return `${target.qualifiedName} (${target.filePath})`;
365 });
366};
367
368describe('a C/C++ reference links what its translation unit declares', () => {
369 it('calls the C function its includes declare, not a bundled copy', () => {

Callers 1

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getNodesInFileMethod · 0.65
getOutgoingEdgesFromMethod · 0.45

Tested by

no test coverage detected