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

Function location

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

Source from the content-addressed store, hash-verified

2555 // A caller is listed at the lines its calls sit on, the lines to edit; a
2556 // callee at its own declaration, where a call leads.
2557 const location = (node: Node, edges: Edge[]) => {
2558 const lines = direction === 'callers' ? callSiteLines(ownEdges(node, edges)) : [];
2559 if (lines.length > 0) return `:${formatCallSiteLines(lines, CLI_CALL_SITES_SHOWN)}`;
2560 return node.startLine ? `:${node.startLine}` : '';
2561 };
2562 const row = (node: Node, edges: Edge[], recursive: boolean) => ({
2563 ...cliNode(node),
2564 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