| 154 | } |
| 155 | |
| 156 | static int fl_score(const flow_node_t *node) { |
| 157 | /* Tests are journeys into the code, not of it: a test function is never |
| 158 | * an interesting entry unless the indexer flagged it as a real one. */ |
| 159 | if (!node->flagged_entry && node->file_path && cbm_is_test_file_path(node->file_path)) |
| 160 | return 0; |
| 161 | int score = 0; |
| 162 | if (node->flagged_entry) |
| 163 | score += 4; |
| 164 | if (node->in_count == 0 && node->out_count > 0) |
| 165 | score += 2; |
| 166 | if (fl_entryish_name(node->name)) |
| 167 | score += 1; |
| 168 | if (node->out_count > node->in_count) |
| 169 | score += 1; |
| 170 | return score; |
| 171 | } |
| 172 | |
| 173 | typedef struct { |
| 174 | int32_t node; |
no test coverage detected