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

Function matchesNonProductionDir

src/search/query-utils.ts:325–336  ·  view source on GitHub ↗

* Check if a path is in a non-production directory (integration, sample, example, etc.) * Handles both absolute paths (/foo/integration/bar) and relative paths (integration/bar).

(lowerPath: string)

Source from the content-addressed store, hash-verified

323 * Handles both absolute paths (/foo/integration/bar) and relative paths (integration/bar).
324 */
325function matchesNonProductionDir(lowerPath: string): boolean {
326 const dirs = [
327 'integration', 'sample', 'samples', 'example', 'examples',
328 'fixture', 'fixtures', 'benchmark', 'benchmarks', 'demo', 'demos',
329 ];
330 for (const dir of dirs) {
331 if (lowerPath.includes('/' + dir + '/') || lowerPath.startsWith(dir + '/')) {
332 return true;
333 }
334 }
335 return false;
336}
337
338/**
339 * Bonus when a node's name matches the search query.

Callers 1

isTestFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected