MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / get_ignore_template

Function get_ignore_template

atomic-cli/src/commands/init.rs:94–249  ·  view source on GitHub ↗

Get the .atomicignore content for a given project kind. This function returns appropriate ignore patterns for common project types, helping users start with sensible defaults. # Arguments `kind` - The project kind (e.g., "rust", "python", "node") # Returns The content for the .atomicignore file, or `None` if the kind is unknown. # Supported Kinds - `rust`: Ignores `target/`, `Cargo.lock` (f

(kind: &str)

Source from the content-addressed store, hash-verified

92/// - `java`: Ignores `target/`, `*.class`, `*.jar`
93/// - `c` / `cpp`: Ignores `*.o`, `*.a`, `*.so`, `build/`
94pub fn get_ignore_template(kind: &str) -> Option<&'static str> {
95 match kind.to_lowercase().as_str() {
96 "rust" => Some(
97 r#"# Rust
98target/
99**/*.rs.bk
100Cargo.lock
101
102# IDE
103.idea/
104.vscode/
105*.swp
106*.swo
107*~
108
109# OS
110.DS_Store
111Thumbs.db
112"#,
113 ),
114 "python" => Some(
115 r#"# Python
116__pycache__/
117*.py[cod]
118*$py.class
119*.so
120.Python
121build/
122dist/
123*.egg-info/
124.eggs/
125.venv/
126venv/
127ENV/
128.pytest_cache/
129.mypy_cache/
130.coverage
131htmlcov/
132
133# IDE
134.idea/
135.vscode/
136*.swp
137*~
138
139# OS
140.DS_Store
141Thumbs.db
142"#,
143 ),
144 "node" | "javascript" | "typescript" | "js" | "ts" => Some(
145 r#"# Node.js
146node_modules/
147npm-debug.log*
148yarn-debug.log*
149yarn-error.log*
150.npm
151.yarn

Calls 1

as_strMethod · 0.45