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

Method getCallers

src/graph/traversal.ts:261–268  ·  view source on GitHub ↗

* Find all callers of a function/method * * @param nodeId - ID of the function/method node * @param maxDepth - Maximum depth to traverse (default: 1) * @returns Array of nodes that call this function

(nodeId: string, maxDepth: number = 1)

Source from the content-addressed store, hash-verified

259 * @returns Array of nodes that call this function
260 */
261 getCallers(nodeId: string, maxDepth: number = 1): Array<{ node: Node; edge: Edge }> {
262 const result: Array<{ node: Node; edge: Edge }> = [];
263 const visited = new Set<string>();
264
265 this.getCallersRecursive(nodeId, maxDepth, 0, result, visited);
266
267 return result;
268 }
269
270 private getCallersRecursive(
271 nodeId: string,

Callers 10

getCallGraphMethod · 0.95
collectMethod · 0.45
hasHeuristicEdgeMethod · 0.45
collectSynthLinksMethod · 0.45
indirectTestNoteMethod · 0.45
handleExploreMethod · 0.45
callerCountMethod · 0.45
formatTrailMethod · 0.45
mainFunction · 0.45

Calls 1

getCallersRecursiveMethod · 0.95

Tested by

no test coverage detected