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

Function is_test_path

atomic-repository/src/content_search.rs:202–213  ·  view source on GitHub ↗

Heuristic: is this path a test file?

(path: &str)

Source from the content-addressed store, hash-verified

200
201/// Heuristic: is this path a test file?
202fn is_test_path(path: &str) -> bool {
203 let lower = path.to_lowercase();
204 lower.contains("/test/")
205 || lower.contains("/tests/")
206 || lower.contains("_test.")
207 || lower.contains("_test_")
208 || lower.contains(".test.")
209 || lower.starts_with("test/")
210 || lower.starts_with("tests/")
211 || lower.starts_with("jstests/")
212 || lower.starts_with("testdata/")
213}
214
215/// Check whether the content index exists and is usable.
216pub fn has_content_index(repo_root: &Path) -> bool {

Callers 1

path_tierFunction · 0.70

Calls 1

containsMethod · 0.45

Tested by

no test coverage detected