Check if a file path looks like a test file. */
| 2703 | |
| 2704 | /* Check if a file path looks like a test file. */ |
| 2705 | static bool is_test_file(const char *path) { |
| 2706 | if (!path) { |
| 2707 | return false; |
| 2708 | } |
| 2709 | return strstr(path, "/test") != NULL || strstr(path, "test_") != NULL || |
| 2710 | strstr(path, "_test.") != NULL || strstr(path, "/tests/") != NULL || |
| 2711 | strstr(path, "/spec/") != NULL || strstr(path, ".test.") != NULL; |
| 2712 | } |
| 2713 | |
| 2714 | /* Convert BFS traversal results into a yyjson_mut array. */ |
| 2715 | /* Find the CALLS-edge "args" JSON (the serialized arg expressions) on the edge |