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

Function index

__tests__/rust-method-path-value.test.ts:26–34  ·  view source on GitHub ↗
(files: Record<string, string>)

Source from the content-addressed store, hash-verified

24});
25
26async function index(files: Record<string, string>): Promise<CodeGraph> {
27 root = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-rust-method-path-'));
28 for (const [rel, content] of Object.entries({ 'Cargo.toml': '[package]\nname = "app"\nversion = "0.1.0"\nedition = "2021"\n', ...files })) {
29 fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true });
30 fs.writeFileSync(path.join(root, rel), content);
31 }
32 cg = await CodeGraph.init(root, { index: true });
33 return cg;
34}
35
36/** What `fn` references or calls, as `<kind> <file>:<qualified name>`, sorted. */
37function outOf(graph: CodeGraph, fn: string): string[] {

Callers 1

Calls 2

joinMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected