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

Function consider

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

Source from the content-addressed store, hash-verified

419 const visited = new Set<string>();
420
421 const consider = (abs: string, rel: string, isDir: boolean): void => {
422 if (isDir) {
423 if (defaults.ignores(rel + '/')) return; // never node_modules/dist/… via include
424 // An explicit `exclude` always wins over `include`; prune the whole subtree
425 // here so a large excluded dir (a committed frontend's own vendored deps,
426 // build output, …) is never walked — the per-file guard below still catches
427 // anything a directory pattern doesn't, so this is a pure efficiency win.
428 if (exclude && exclude.ignores(rel + '/')) return;
429 walk(abs);
430 } else {
431 if (defaults.ignores(rel)) return;
432 if (!include.ignores(rel)) return;
433 if (exclude && exclude.ignores(rel)) return;
434 if (!isSourceFile(rel, overrides)) return;
435 out.add(rel);
436 }
437 };
438
439 function walk(absDir: string): void {
440 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