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

Function is_test_path

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

Heuristic: is this path a test file?

(path: &str)

Source from the content-addressed store, hash-verified

513
514/// Heuristic: is this path a test file?
515fn is_test_path(path: &str) -> bool {
516 let lower = path.to_lowercase();
517 lower.contains("/test/")
518 || lower.contains("/tests/")
519 || lower.contains("_test.")
520 || lower.contains("_test_")
521 || lower.contains(".test.")
522 || lower.starts_with("test/")
523 || lower.starts_with("tests/")
524 || lower.starts_with("jstests/")
525 || lower.starts_with("testdata/")
526}
527
528/// Check whether the content index exists and is usable.
529pub fn has_content_index(repo_root: &Path) -> bool {

Callers 1

path_tierFunction · 0.85

Calls 1

containsMethod · 0.45

Tested by

no test coverage detected