Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultIgnorePatterns = []string{
".git",
".svn",
".hg",
"node_modules",
"vendor",
"bower_components",
".npm",
".yarn",
".pnp.*",
"dist",
"build",
"out",
"target",
"bin",
"obj",
".idea",
".vscode",
".vs",
"*.swp",
"*.swo",
"*~",
".DS_Store",
"Thumbs.db",
"desktop.ini",
"__pycache__",
"*.pyc",
"*.pyo",
".venv",
"venv",
".env",
"*.exe",
"*.dll",
"*.so",
"*.dylib",
"*.o",
"*.a",
"*.lib",
"*.class",
"*.jar",
"*.war",
"*.zip",
"*.tar",
"*.tar.gz",
"*.tgz",
"*.rar",
"*.7z",
"*.png",
"*.jpg",
"*.jpeg",
"*.gif",
"*.bmp",
"*.ico",
"*.webp",
"*.tiff",
"*.woff",
"*.woff2",
"*.ttf",
"*.eot",
"*.otf",
"*.mp3",
"*.mp4",
"*.avi",
"*.mov",
"*.wav",
"*.flac",
"*.pdf",
"*.doc",
"*.docx",
"*.xls",
"*.xlsx",
"*.ppt",
"*.pptx",
"*.min.js",
"*.min.css",
"package-lock.json",
"yarn.lock",
"pnpm-lock.yaml",
"Gemfile.lock",
"poetry.lock",
"Cargo.lock",
"go.sum",
"composer.lock",
"*.map",
"coverage",
".nyc_output",
"htmlcov",
".cache",
".parcel-cache",
".next",
".nuxt",
"*.log",
"*.sqlite",
"*.sqlite3",
"*.db",
}
DefaultIgnorePatterns contains patterns that should always be ignored during indexing. These are common directories and files that are never useful for code search.
Functions ¶
This section is empty.
Types ¶
type Matcher ¶
type Matcher struct {
// contains filtered or unexported fields
}
Matcher determines whether a file path should be ignored during indexing. It combines default patterns, .gitignore rules, .claudeignore rules, and custom CLI patterns. Thread-safe: Reload() acquires a write lock, ShouldIgnore()/ShouldIgnoreDir() acquire a read lock.
func NewMatcher ¶
func NewMatcher(options MatcherOptions) *Matcher
NewMatcher creates an ignore matcher that checks default patterns, .gitignore, .claudeignore, and custom patterns.
func (*Matcher) IsFileTooLarge ¶
IsFileTooLarge returns true if the file exceeds the max file size limit.
func (*Matcher) MaxFileSizeBytes ¶
MaxFileSizeBytes returns the configured maximum file size.
func (*Matcher) Reload ¶
func (m *Matcher) Reload()
Reload re-reads .gitignore and .claudeignore files from disk. Used when the watcher detects changes to these files.
func (*Matcher) ShouldIgnore ¶
ShouldIgnore returns true if the given path should be excluded from indexing. The path should be an absolute path or relative to the root directory.
func (*Matcher) ShouldIgnoreDir ¶
ShouldIgnoreDir returns true if a directory should be skipped entirely during traversal.