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

Method currentMatcher

src/index.ts:263–271  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

loadDeprioritizePatternsFunction · 0.90
addMethod · 0.45

Tested by

no test coverage detected