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

Function writeProject

__tests__/cpp-implicit-this-calls.test.ts:23–30  ·  view source on GitHub ↗
(prefix: string, files: Record<string, string>)

Source from the content-addressed store, hash-verified

21import { CodeGraph } from '../src';
22
23function writeProject(prefix: string, files: Record<string, string>): string {
24 const root = fs.mkdtempSync(path.join(os.tmpdir(), prefix));
25 for (const [rel, content] of Object.entries(files)) {
26 fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true });
27 fs.writeFileSync(path.join(root, rel), content);
28 }
29 return root;
30}
31
32/** The edges carrying a call's name out of the function or method `qualifiedName` in `file`. */
33function callEdgesFrom(cg: CodeGraph, file: string, qualifiedName: string) {

Callers 1

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected