pub const DEFAULT_EXCLUDES: &[&str] = &[
"node_modules/",
"dist/",
"build/",
"target/",
"out/",
".next/",
".nuxt/",
"__pycache__/",
"*.pyc",
"*.pyo",
".cache/",
".pytest_cache/",
".mypy_cache/",
".ruff_cache/",
"coverage/",
".coverage",
".venv/",
"venv/",
"env/",
".git/",
".hg/",
".svn/",
".worktrees/",
"*.so",
"*.dylib",
"*.dll",
"*.o",
"*.a",
"*.jar",
"*.class",
"*.exe",
"*.obj",
"*.mp4",
"*.mov",
"*.mkv",
"*.webm",
"*.zip",
"*.tar",
"*.tar.gz",
"*.tgz",
"*.7z",
"*.rar",
"*.iso",
".env",
".env.*",
".env.local",
".env.*.local",
".DS_Store",
"Thumbs.db",
"*.log",
"*.lock",
];
pub fn default_exclude_file_content() -> String {
DEFAULT_EXCLUDES.join("\n") + "\n"
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn default_excludes_cover_build_artifacts() {
let content = default_exclude_file_content();
for needle in [
"node_modules/",
"target/",
".git/",
".venv/",
"__pycache__/",
] {
assert!(content.contains(needle), "missing {needle}");
}
}
}