MCPcopy Create free account
hub / github.com/openai/plugins / visit

Function visit

plugins/plugin-eval/src/evaluators/coverage.js:11–29  ·  view source on GitHub ↗
(currentPath)

Source from the content-addressed store, hash-verified

9 const ignored = new Set([".git", "node_modules", ".venv", "venv", "__pycache__"]);
10
11 async function visit(currentPath) {
12 const entries = await fs.readdir(currentPath, { withFileTypes: true });
13 for (const entry of entries) {
14 const entryPath = path.join(currentPath, entry.name);
15 if (entry.isDirectory()) {
16 if (ignored.has(entry.name)) {
17 continue;
18 }
19 await visit(entryPath);
20 continue;
21 }
22 if (
23 entry.isFile() &&
24 ["lcov.info", "coverage.xml", "coverage-final.json", "coverage-summary.json"].includes(entry.name)
25 ) {
26 results.push(entryPath);
27 }
28 }
29 }
30
31 await visit(rootPath);
32 return results.sort();

Callers 1

findCoverageFilesFunction · 0.70

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected