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

Function loadIncludeMatcher

src/extraction/index.ts:716–719  ·  view source on GitHub ↗

* Matcher for the project's `codegraph.json` `include` patterns — first-party * source to force INTO the index even when `.gitignore` drops it (the general * whitelist `includeIgnored` never was — that one only revives *embedded git * repos*). The case it exists for: a project under a second VCS

(rootDir: string)

Source from the content-addressed store, hash-verified

714 * operation from the scan root.
715 */
716function loadIncludeMatcher(rootDir: string): Ignore | null {
717 const patterns = loadIncludePatterns(rootDir);
718 return patterns.length > 0 ? ignore().add(patterns) : null;
719}
720
721/** Glob metacharacters that end the static (literal) prefix of an `include` pattern. */
722const GLOB_META = /[*?[\]{}!]/;

Callers 3

buildScopeIgnoreFunction · 0.85
includedFileChangesMethod · 0.85

Calls 2

loadIncludePatternsFunction · 0.90
addMethod · 0.45

Tested by

no test coverage detected