Skip to content

Commit 7e73b48

Browse files
DeusDataclaude
andcommitted
style(cli): clang-format the OpenHands install helpers (DeusData#2116)
CI's clang-format-20 flagged continuation-line alignment in the new OpenHands MCP install/uninstall helpers (cbm_build_openhands_mcp_entry, cbm_upsert_openhands_settings_mcp, cbm_remove_openhands_settings_mcp, openhands_update_profile_refs). Reformat only those regions with clang-format-20 to satisfy the lint gate; whitespace-only, no behaviour change. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent 3a4160b commit 7e73b48

1 file changed

Lines changed: 13 additions & 16 deletions

File tree

‎src/cli/cli.c‎

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2318,8 +2318,8 @@ static char *cbm_build_openhands_mcp_entry(const char *binary_path) {
23182318
}
23192319
yyjson_mut_val *root = yyjson_mut_obj(doc);
23202320
bool ok = root && yyjson_mut_obj_add_strcpy(doc, root, "transport", "stdio") &&
2321-
yyjson_mut_obj_add_strcpy(doc, root, "command", binary_path) &&
2322-
yyjson_mut_obj_add_bool(doc, root, "enabled", true);
2321+
yyjson_mut_obj_add_strcpy(doc, root, "command", binary_path) &&
2322+
yyjson_mut_obj_add_bool(doc, root, "enabled", true);
23232323
char *json = NULL;
23242324
if (ok) {
23252325
yyjson_mut_doc_set_root(doc, root);
@@ -2349,10 +2349,9 @@ static int cbm_upsert_openhands_settings_mcp(const char *binary_path, const char
23492349
cbm_json_like_object_field_t fields[3];
23502350
size_t field_count = cbm_openhands_ownership_fields(fields);
23512351
char *command = NULL;
2352-
int ownership =
2353-
cbm_json_like_match_object_entry(document, document_length, path, 1U,
2354-
CBM_DEFAULT_MCP_SERVER_NAME, fields, field_count,
2355-
&command);
2352+
int ownership = cbm_json_like_match_object_entry(document, document_length, path, 1U,
2353+
CBM_DEFAULT_MCP_SERVER_NAME, fields,
2354+
field_count, &command);
23562355
free(command);
23572356
if (ownership == CBM_JSON_LIKE_OBJECT_MATCH ||
23582357
ownership == CBM_JSON_LIKE_OBJECT_MATCH_WITH_EXTRAS) {
@@ -2400,8 +2399,8 @@ static int cbm_remove_openhands_settings_mcp(const char *settings_path) {
24002399
size_t field_count = cbm_openhands_ownership_fields(fields);
24012400
char *command = NULL;
24022401
int ownership = cbm_json_like_match_object_entry(document, document_length, path, 1U,
2403-
CBM_DEFAULT_MCP_SERVER_NAME, fields,
2404-
field_count, &command);
2402+
CBM_DEFAULT_MCP_SERVER_NAME, fields,
2403+
field_count, &command);
24052404
free(command);
24062405
if (ownership == CBM_JSON_LIKE_OBJECT_MISSING || ownership == CBM_JSON_LIKE_OBJECT_MISMATCH) {
24072406
free(document);
@@ -9374,8 +9373,7 @@ static bool cbm_filename_has_suffix(const char *name, const char *suffix) {
93749373
* directory is a silent no-op in both directions — install must never invent
93759374
* it, and uninstall has nothing to undo there. Only *.json entries are
93769375
* touched; a profile directory may hold arbitrary notes alongside profiles. */
9377-
static void openhands_update_profile_refs(const char *profiles_dir, bool installing,
9378-
bool dry_run) {
9376+
static void openhands_update_profile_refs(const char *profiles_dir, bool installing, bool dry_run) {
93799377
cbm_dir_t *d = cbm_opendir(profiles_dir);
93809378
if (!d) {
93819379
return;
@@ -9392,15 +9390,14 @@ static void openhands_update_profile_refs(const char *profiles_dir, bool install
93929390
if (stat(profile_path, &state) != 0 || !S_ISREG(state.st_mode) || dry_run) {
93939391
continue;
93949392
}
9395-
int result = installing ? cbm_json_like_add_unique_string(
9396-
profile_path, "mcp_server_refs", CBM_DEFAULT_MCP_SERVER_NAME)
9393+
int result = installing ? cbm_json_like_add_unique_string(profile_path, "mcp_server_refs",
9394+
CBM_DEFAULT_MCP_SERVER_NAME)
93979395
: cbm_json_like_remove_string(profile_path, "mcp_server_refs",
93989396
CBM_DEFAULT_MCP_SERVER_NAME);
93999397
if (result != CLI_OK) {
9400-
record_agent_config_error(!installing, "OpenHands",
9401-
installing ? "profile_refs_install"
9402-
: "profile_refs_uninstall",
9403-
profile_path);
9398+
record_agent_config_error(
9399+
!installing, "OpenHands",
9400+
installing ? "profile_refs_install" : "profile_refs_uninstall", profile_path);
94049401
}
94059402
}
94069403
cbm_closedir(d);

0 commit comments

Comments
 (0)