Heuristic: is this path a test file?
(path: &str)
| 200 | |
| 201 | /// Heuristic: is this path a test file? |
| 202 | fn 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. |
| 216 | pub fn has_content_index(repo_root: &Path) -> bool { |