True if a File-labelled node with exactly `name` exists. */
| 47 | |
| 48 | /* True if a File-labelled node with exactly `name` exists. */ |
| 49 | static int r964_file_node_exists(cbm_store_t *store, const char *project, const char *name) { |
| 50 | cbm_node_t *nodes = NULL; |
| 51 | int count = 0; |
| 52 | if (cbm_store_find_nodes_by_label(store, project, "File", &nodes, &count) != CBM_STORE_OK) |
| 53 | return 0; |
| 54 | int found = 0; |
| 55 | for (int i = 0; i < count; i++) { |
| 56 | if (nodes[i].name && strcmp(nodes[i].name, name) == 0) |
| 57 | found = 1; |
| 58 | } |
| 59 | cbm_store_free_nodes(nodes, count); |
| 60 | return found; |
| 61 | } |
| 62 | |
| 63 | /* Count INBOUND edges (any of the reporter's connection types) landing on the |
| 64 | * File node named `name` — the exact disconnection metric from the issue's |
no test coverage detected