a06f331eb8
CI / benchmark (push) Has been skipped
install-script / posix-syntax (push) Successful in 6m1s
CI / build-onnx (push) Failing after 6m43s
init-smoke / dry-run (push) Failing after 15m57s
security / govulncheck (push) Has been cancelled
security / trivy-fs (push) Has been cancelled
CI / test (1.26, ubuntu-latest) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
CI / test (1.26, macos-latest) (push) Has been cancelled
CI / build-windows (push) Has been cancelled
CI / lint (push) Has been cancelled
install-script / powershell-syntax (push) Has been cancelled
install-script / install (macos-14) (push) Has been cancelled
install-script / install (ubuntu-latest) (push) Has been cancelled
55 lines
1.8 KiB
Go
55 lines
1.8 KiB
Go
// Package excludes provides a unified path-exclusion matcher used by
|
|
// both the indexer's initial walk and the watcher's live event filter.
|
|
// Patterns follow .gitignore semantics (via go-gitignore): leading '/'
|
|
// anchors at the root, trailing '/' restricts to directories, '!' negates,
|
|
// '**' matches any number of path segments.
|
|
package excludes
|
|
|
|
// Builtin is the superset of directory/file patterns that Gortex always
|
|
// excludes, regardless of user config. It merges what the indexer and
|
|
// watcher used to maintain as two divergent hardcoded lists.
|
|
//
|
|
// Users can re-include an entry by listing "!pattern" in global,
|
|
// RepoEntry, or workspace config.
|
|
var Builtin = []string{
|
|
".git/",
|
|
".hg/",
|
|
".svn/",
|
|
".terraform/",
|
|
".gortex-cache/",
|
|
".gortex/", // Gortex's per-repo state dir (quarantine, merkle tree)
|
|
".claude/",
|
|
".kiro/",
|
|
"node_modules/",
|
|
"vendor/",
|
|
".venv/",
|
|
"venv/",
|
|
"__pycache__/",
|
|
".mypy_cache/",
|
|
".tox/",
|
|
".next/",
|
|
"target/",
|
|
"build/",
|
|
"dist/",
|
|
// Package-manager + build dirs for non-JS/non-Go ecosystems. These
|
|
// are indexed-by-default without these entries, which pollutes the
|
|
// graph with upstream code (e.g. CocoaPods' sqlite3.c — 150k+ lines)
|
|
// that users can't act on. Names are unambiguous — no first-party
|
|
// project uses `Pods/` or `.dart_tool/` for its own source.
|
|
"Pods/", // CocoaPods (iOS/macOS)
|
|
".gradle/", // Gradle build cache (Android/JVM)
|
|
".bundle/", // Ruby Bundler cache
|
|
".dart_tool/", // Dart/Flutter build cache
|
|
".pub-cache/", // Dart global pub cache, occasionally vendored
|
|
"*.tmp",
|
|
// Editor scratch/backup files. Vim cycles swap suffixes backward
|
|
// through the alphabet (.swp → .swo → .swn → ...); neovim writes a
|
|
// .swpx auxiliary alongside .swp on some platforms.
|
|
"*.swp",
|
|
"*.swo",
|
|
"*.swn",
|
|
"*.swm",
|
|
"*.swpx",
|
|
"*~",
|
|
}
|