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

Function consider

src/extraction/index.ts:436–452  ·  view source on GitHub ↗
(abs: string, rel: string, isDir: boolean)

Source from the content-addressed store, hash-verified

434 const visited = new Set<string>();
435
436 const consider = (abs: string, rel: string, isDir: boolean): void => {
437 if (isDir) {
438 if (defaults.ignores(rel + '/')) return; // never node_modules/dist/… via include
439 // An explicit `exclude` always wins over `include`; prune the whole subtree
440 // here so a large excluded dir (a committed frontend's own vendored deps,
441 // build output, …) is never walked — the per-file guard below still catches
442 // anything a directory pattern doesn't, so this is a pure efficiency win.
443 if (exclude && exclude.ignores(rel + '/')) return;
444 walk(abs);
445 } else {
446 if (defaults.ignores(rel)) return;
447 if (!include.ignores(rel)) return;
448 if (exclude && exclude.ignores(rel)) return;
449 if (!isSourceFile(rel, overrides)) return;
450 out.add(rel);
451 }
452 };
453
454 function walk(absDir: string): void {
455 let realDir: string;

Callers 3

walkFunction · 0.85
extractDecoratorsForMethod · 0.85
boundaryCandidatesMethod · 0.85

Calls 3

isSourceFileFunction · 0.90
ignoresMethod · 0.80
walkFunction · 0.70

Tested by

no test coverage detected