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

Function referencers

__tests__/rust-enum-variant-reference.test.ts:36–42  ·  view source on GitHub ↗

`file:name` of every symbol with a `references` edge to the node.

(nodeId: string)

Source from the content-addressed store, hash-verified

34
35/** `file:name` of every symbol with a `references` edge to the node. */
36function referencers(nodeId: string): string[] {
37 const names = cg!.getIncomingEdges(nodeId)
38 .filter((e) => e.kind === 'references')
39 .map((e) => cg!.getNode(e.source)!)
40 .map((n) => `${n.filePath.replace(/^src\//, '')}:${n.name}`);
41 return [...new Set(names)].sort();
42}
43
44const MODE = `pub enum Mode {
45 A,

Calls 3

mapMethod · 0.80
getNodeMethod · 0.80
getIncomingEdgesMethod · 0.65

Tested by

no test coverage detected