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

Function consider

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

Source from the content-addressed store, hash-verified

801 const visited = new Set<string>();
802
803 const consider = (abs: string, rel: string, isDir: boolean): void => {
804 if (isDir) {
805 if (defaults.ignores(rel + '/')) return; // never node_modules/dist/… via include
806 // An explicit `exclude` always wins over `include`; prune the whole subtree
807 // here so a large excluded dir (a committed frontend's own vendored deps,
808 // build output, …) is never walked — the per-file guard below still catches
809 // anything a directory pattern doesn't, so this is a pure efficiency win.
810 if (exclude && exclude.ignores(rel + '/')) return;
811 walk(abs);
812 } else {
813 if (defaults.ignores(rel)) return;
814 if (!include.ignores(rel)) return;
815 if (exclude && exclude.ignores(rel)) return;
816 if (!isSourceFile(rel, overrides, rootDir)) return;
817 out.add(rel);
818 }
819 };
820
821 function walk(absDir: string): void {
822 let realDir: string;

Callers 2

walkFunction · 0.70
extractDecoratorsForMethod · 0.70

Calls 4

isSourceFileFunction · 0.90
ignoresMethod · 0.80
walkFunction · 0.70
addMethod · 0.45

Tested by

no test coverage detected