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

Function is_test_path

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

Heuristic: is this path a test file?

(path: &str)

Source from the content-addressed store, hash-verified

560
561/// Heuristic: is this path a test file?
562fn is_test_path(path: &str) -> bool {
563 let lower = path.to_lowercase();
564 lower.contains("/test/")
565 || lower.contains("/tests/")
566 || lower.contains("_test.")
567 || lower.contains("_test_")
568 || lower.contains(".test.")
569 || lower.starts_with("test/")
570 || lower.starts_with("tests/")
571 || lower.starts_with("jstests/")
572 || lower.starts_with("testdata/")
573}
574
575/// Check whether the content index exists and is usable.
576pub 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