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