Expand description
Shared default exclusion lists and matcher (ADR-010).
One source of truth for CLI, FUSE/mount, library IndexerConfig, and docs.
Hidden files and hidden directories under the index root are excluded by
default. A separate secret-file denylist is always applied unless the user
sets include_secret_files. Gitignore ! rules cannot re-include a secret
or hidden path.
Built-in secret patterns follow gitleaks / TruffleHog-style filename
denylists (*.pem, *.key, id_rsa / id_ed25519, credentials files,
.netrc, .npmrc, .pypirc, .env*, kube config). A bare id_* is
intentionally not used (false positive on id_mapping.md).
Hidden/secret path exclusion is adapted from sophie4869/ragfs
onto the ignore crate (WalkBuilder + OverrideBuilder) as specified
by ADR-010. Nested .ragfsignore files are supported under the index root.
Re-exportsยง
use ignore::WalkBuilder;๐use ignore::gitignore::Gitignore;๐use ignore::overrides::Override;๐use ignore::overrides::OverrideBuilder;๐use std::path::Component;๐use std::path::Path;๐use std::path::PathBuf;๐use tracing::warn;๐use crate::indexer::path_matches_pattern;๐
Structsยง
- Exclusion
Matcher - Matcher bound to one index root.
- Exclusion
Options - Options for
ExclusionMatcher.
Constantsยง
- DEFAULT_
NOISE_ PATTERNS - Noise / build-artifact globs used as the default
[index].excludelist. - DEFAULT_
SECRET_ PATTERNS - Secret-file denylist (ADR-010). Always applied unless
include_secret_files.
Functionsยง
- add_
ignore_ ๐override - Add an ignore override (
!glob). - build_
overrides ๐ - default_
exclude_ patterns - Default
[index].exclude/IndexerConfig.exclude_patterns(noise only). - gitignore_
excludes ๐ - Honour
.gitignore/.ignorefrom the index root down topath. - is_
hidden_ ๐component - is_
hidden_ ๐under_ root - matches_
include ๐ - override_
ignores ๐ - path_
for_ ๐override