Build an enriched snippet response for a resolved node. */ Add a string array to a JSON object (no-op if count == 0). */
| 13001 | /* Build an enriched snippet response for a resolved node. */ |
| 13002 | /* Add a string array to a JSON object (no-op if count == 0). */ |
| 13003 | static void add_string_array(yyjson_mut_doc *doc, yyjson_mut_val *obj, const char *key, |
| 13004 | char **strings, int count) { |
| 13005 | if (count <= 0) { |
| 13006 | return; |
| 13007 | } |
| 13008 | yyjson_mut_val *arr = yyjson_mut_arr(doc); |
| 13009 | for (int i = 0; i < count; i++) { |
| 13010 | yyjson_mut_arr_add_str(doc, arr, strings[i]); |
| 13011 | } |
| 13012 | yyjson_mut_obj_add_val(doc, obj, key, arr); |
| 13013 | } |
| 13014 | |
| 13015 | /* get_code_snippet coverage note (#963): if the resolved node's file is |
| 13016 | * flagged parse_partial or parse_unusable, warn that the graph may |
no outgoing calls
no test coverage detected