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

Function isIgnored

src/extraction/index.ts:1277–1285  ·  view source on GitHub ↗
(fullPath: string, isDir: boolean, matchers: ScopedIgnore[])

Source from the content-addressed store, hash-verified

1275 };
1276
1277 const isIgnored = (fullPath: string, isDir: boolean, matchers: ScopedIgnore[]): boolean => {
1278 for (const { dir, ig } of matchers) {
1279 let rel = normalizePath(path.relative(dir, fullPath));
1280 if (!rel || rel.startsWith('..')) continue; // not under this matcher's dir
1281 if (isDir) rel += '/'; // dir-only rules (e.g. `build/`) only match with the slash
1282 if (ig.ignores(rel)) return true;
1283 }
1284 return false;
1285 };
1286
1287 function walk(dir: string, matchers: ScopedIgnore[]): void {
1288 let realDir: string;

Callers 1

walkFunction · 0.85

Calls 2

normalizePathFunction · 0.90
ignoresMethod · 0.80

Tested by

no test coverage detected