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

Function targetLineOfCallAt

__tests__/swift-label-overload.test.ts:52–55  ·  view source on GitHub ↗
(line: number)

Source from the content-addressed store, hash-verified

50});
51
52const targetLineOfCallAt = (line: number) => {
53 const ids = cg.getNodesInFile('Sources/TableController.swift').map((n) => n.id);
54 return cg.getOutgoingEdgesFrom(ids).filter((e) => e.kind === 'calls' && e.line === line).map((e) => cg.getNode(e.target)!.startLine);
55};
56
57describe('Swift overloads by label', () => {
58 it('reach the overload whose labels the call spells', () => {

Callers 1

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getNodesInFileMethod · 0.65
getOutgoingEdgesFromMethod · 0.45

Tested by

no test coverage detected