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

Function indexed

__tests__/cpp-local-callable-calls.test.ts:31–39  ·  view source on GitHub ↗
(files: Record<string, string>)

Source from the content-addressed store, hash-verified

29});
30
31async function indexed(files: Record<string, string>): Promise<CodeGraph> {
32 const root = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-cpp-local-callable-'));
33 roots.push(root);
34 for (const [rel, content] of Object.entries(files)) {
35 fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true });
36 fs.writeFileSync(path.join(root, rel), content);
37 }
38 return CodeGraph.init(root, { index: true });
39}
40
41function callable(cg: CodeGraph, qualifiedName: string): Node {
42 const node = [...cg.getNodesByKind('method'), ...cg.getNodesByKind('function')].find((n) => n.qualifiedName === qualifiedName);

Calls 3

pushMethod · 0.80
joinMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected