Heuristic: is this path a test file?
(path: &str)
| 560 | |
| 561 | /// Heuristic: is this path a test file? |
| 562 | fn 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. |
| 576 | pub fn has_content_index(repo_root: &Path) -> bool { |