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

Method currentMatcher

src/index.ts:266–274  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

loadDeprioritizePatternsFunction · 0.90
addMethod · 0.45

Tested by

no test coverage detected