(files: Record<string, string>)
| 35 | }); |
| 36 | |
| 37 | async function indexed(files: Record<string, string>): Promise<CodeGraph> { |
| 38 | const root = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-cpp-undeclared-')); |
| 39 | roots.push(root); |
| 40 | for (const [rel, content] of Object.entries(files)) { |
| 41 | fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true }); |
| 42 | fs.writeFileSync(path.join(root, rel), content); |
| 43 | } |
| 44 | return CodeGraph.init(root, { index: true }); |
| 45 | } |
| 46 | |
| 47 | function callable(cg: CodeGraph, qualifiedName: string): Node { |
| 48 | const node = [...cg.getNodesByKind('method'), ...cg.getNodesByKind('function')].find((n) => n.qualifiedName === qualifiedName); |
no test coverage detected