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

Function location

src/bin/codegraph.ts:2636–2640  ·  view source on GitHub ↗
(node: Node, edges: Edge[])

Source from the content-addressed store, hash-verified

2634 // A caller is listed at the lines its calls sit on, the lines to edit; a
2635 // callee at its own declaration, where a call leads.
2636 const location = (node: Node, edges: Edge[]) => {
2637 const lines = direction === 'callers' ? callSiteLines(ownEdges(node, edges)) : [];
2638 if (lines.length > 0) return `:${formatCallSiteLines(lines, CLI_CALL_SITES_SHOWN)}`;
2639 return node.startLine ? `:${node.startLine}` : '';
2640 };
2641 const row = (node: Node, edges: Edge[], recursive: boolean) => ({
2642 ...cliNode(node),
2643 relationships: relationships(node, edges),

Callers 1

mainFunction · 0.70

Calls 3

callSiteLinesFunction · 0.90
formatCallSiteLinesFunction · 0.90
ownEdgesFunction · 0.85

Tested by

no test coverage detected