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

Function is_test_path

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

Heuristic: is this path a test file?

(path: &str)

Source from the content-addressed store, hash-verified

311
312/// Heuristic: is this path a test file?
313fn is_test_path(path: &str) -> bool {
314 let lower = path.to_lowercase();
315 lower.contains("/test/")
316 || lower.contains("/tests/")
317 || lower.contains("_test.")
318 || lower.contains("_test_")
319 || lower.contains(".test.")
320 || lower.starts_with("test/")
321 || lower.starts_with("tests/")
322 || lower.starts_with("jstests/")
323 || lower.starts_with("testdata/")
324}
325
326/// Check whether the content index exists and is usable.
327pub 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