Directories that should be skipped when walking source trees.
(name: &str)
| 169 | |
| 170 | /// Directories that should be skipped when walking source trees. |
| 171 | pub fn should_skip_dir(name: &str) -> bool { |
| 172 | matches!( |
| 173 | name, |
| 174 | ".git" |
| 175 | | "node_modules" |
| 176 | | "target" |
| 177 | | "dist" |
| 178 | | "build" |
| 179 | | "vendor" |
| 180 | | "__pycache__" |
| 181 | | ".next" |
| 182 | | "coverage" |
| 183 | | ".cache" |
| 184 | | ".idea" |
| 185 | | ".vscode" |
| 186 | | ".tox" |
| 187 | | ".mypy_cache" |
| 188 | | ".pytest_cache" |
| 189 | | ".eggs" |
| 190 | | "venv" |
| 191 | | ".venv" |
| 192 | | "env" |
| 193 | ) |
| 194 | } |
| 195 | |
| 196 | /// Walk a repository directory and collect metadata for all non-binary source |
| 197 | /// files. Uses the `ignore` crate to automatically respect .gitignore rules |