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

Function get_ignore_template

atomic-cli/src/commands/init.rs:101–256  ·  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

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

Calls 1

as_strMethod · 0.45