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.

style(cli): clang-format CBM_CLI_USAGE and help-text test

Lowpower2f557f539869
diff --git a/src/cli/cli.h b/src/cli/cli.h
index a1b749bb0..5522edef0 100644
--- a/src/cli/cli.h
+++ b/src/cli/cli.h
@@ -29,14 +29,14 @@ const char *cbm_cli_get_version(void);
/* Top-level `cli --help` text printed by run_cli() in src/main.c.
* Documents tool-level --format without adding a session-wide flag (#2102). */
-#define CBM_CLI_USAGE \
+#define CBM_CLI_USAGE \
"Usage: codebase-memory-mcp cli [--quiet] [--progress] [--verbose] [--json] <tool_name> " \
- "[json_args]\n" \
- " --quiet Show errors only; cannot combine with --progress or outer --verbose\n" \
- " --progress Show lifecycle progress even when stderr is redirected\n" \
- " --verbose Include informational logs (preserves CBM_LOG_LEVEL=debug)\n" \
- " --json Print the raw MCP result envelope\n" \
- " Tools that accept format support --format tree|json (default: tree).\n" \
+ "[json_args]\n" \
+ " --quiet Show errors only; cannot combine with --progress or outer --verbose\n" \
+ " --progress Show lifecycle progress even when stderr is redirected\n" \
+ " --verbose Include informational logs (preserves CBM_LOG_LEVEL=debug)\n" \
+ " --json Print the raw MCP result envelope\n" \
+ " Tools that accept format support --format tree|json (default: tree).\n" \
" --format json prints payload JSON; outer --json prints the full MCP envelope.\n"
/* Convert `--flag value` / `--flag=value` / bare-boolean `--flag` arguments for
diff --git a/tests/test_cli.c b/tests/test_cli.c
index 2ca51ab2f..01fb79ec8 100644
--- a/tests/test_cli.c
+++ b/tests/test_cli.c
@@ -15344,8 +15344,8 @@ TEST(cli_usage_points_to_tool_format_json_issue2102) {
ASSERT_NOT_NULL(strstr(CBM_CLI_USAGE, "payload JSON"));
ASSERT_NOT_NULL(strstr(CBM_CLI_USAGE, "full MCP envelope"));
ASSERT_NOT_NULL(strstr(CBM_CLI_USAGE, "--json Print the raw MCP result envelope"));
- ASSERT_NOT_NULL(strstr(CBM_CLI_USAGE,
- "cli [--quiet] [--progress] [--verbose] [--json] <tool_name>"));
+ ASSERT_NOT_NULL(strstr(CBM_CLI_USAGE, "cli [--quiet] [--progress] [--verbose] [--json] "
+ "<tool_name>"));
ASSERT_NULL(strstr(CBM_CLI_USAGE, "[--format"));
ASSERT_NULL(strstr(CBM_CLI_USAGE, "CBM_CLI_FORMAT"));
PASS();