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

Method currentMatcher

src/index.ts:261–269  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

loadDeprioritizePatternsFunction · 0.90
addMethod · 0.45

Tested by

no test coverage detected