Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

Fix lint issues in TypeBox schema conversion

Sakil Ansari004c555448e4
diff --git a/src/cli/client_adapter.c b/src/cli/client_adapter.c
index 6775f467e..1a8a312ec 100644
--- a/src/cli/client_adapter.c
+++ b/src/cli/client_adapter.c
@@ -153,8 +153,13 @@ static void convert_json_schema_to_typebox(adapter_sb_t *sb, const char *schema_
}
yyjson_val *root = yyjson_doc_get_root(doc);
- yyjson_val *properties = yyjson_obj_get(root, "properties");
+ if (!root) {
+ sb_append(sb, "Type.Object({})");
+ yyjson_doc_free(doc);
+ return;
+ }
+ yyjson_val *properties = yyjson_obj_get(root, "properties");
if (!properties) {
sb_append(sb, "Type.Object({})");
yyjson_doc_free(doc);
@@ -173,6 +178,9 @@ static void convert_json_schema_to_typebox(adapter_sb_t *sb, const char *schema_
continue;
}
+ /* Suppress unused parameter warning */
+ (void)val;
+
if (!first_prop) {
sb_append(sb, ",\n");
}