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

Function location

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

Source from the content-addressed store, hash-verified

2687 // A caller is listed at the lines its calls sit on, the lines to edit; a
2688 // callee at its own declaration, where a call leads.
2689 const location = (node: Node, edges: Edge[]) => {
2690 const lines = direction === 'callers' ? callSiteLines(ownEdges(node, edges)) : [];
2691 if (lines.length > 0) return `:${formatCallSiteLines(lines, CLI_CALL_SITES_SHOWN)}`;
2692 return node.startLine ? `:${node.startLine}` : '';
2693 };
2694 const row = (node: Node, edges: Edge[], recursive: boolean) => ({
2695 ...cliNode(node),
2696 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