Build an enriched snippet response for a resolved node. */ Add a string array to a JSON object (no-op if count == 0). */
| 8432 | /* Build an enriched snippet response for a resolved node. */ |
| 8433 | /* Add a string array to a JSON object (no-op if count == 0). */ |
| 8434 | static void add_string_array(yyjson_mut_doc *doc, yyjson_mut_val *obj, const char *key, |
| 8435 | char **strings, int count) { |
| 8436 | if (count <= 0) { |
| 8437 | return; |
| 8438 | } |
| 8439 | yyjson_mut_val *arr = yyjson_mut_arr(doc); |
| 8440 | for (int i = 0; i < count; i++) { |
| 8441 | yyjson_mut_arr_add_str(doc, arr, strings[i]); |
| 8442 | } |
| 8443 | yyjson_mut_obj_add_val(doc, obj, key, arr); |
| 8444 | } |
| 8445 | |
| 8446 | /* get_code_snippet coverage note (#963): if the resolved node's file is |
| 8447 | * flagged parse_partial, warn that the graph may under-report this file. |
no outgoing calls
no test coverage detected