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

Method currentMatcher

src/index.ts:262–270  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

260 // The compiled matcher for the patterns `codegraph.json` holds right now,
261 // or null when there are none.
262 const currentMatcher = (): ReturnType<typeof ignore> | null => {
263 const patterns = loadDeprioritizePatterns(this.projectRoot);
264 if (patterns.length === 0) return null;
265 if (patterns !== cachedPatterns) {
266 cachedPatterns = patterns;
267 cachedMatcher = ignore().add(patterns);
268 }
269 return cachedMatcher!;
270 };
271 const matches = (matcher: ReturnType<typeof ignore> | null, filePath: string): boolean => {
272 if (!matcher) return false;
273 const rel = path.isAbsolute(filePath)

Callers

nothing calls this directly

Calls 2

loadDeprioritizePatternsFunction · 0.90
addMethod · 0.45

Tested by

no test coverage detected