From afe3fd1aa914a563ebb59de2c06fc9c9676f38cb Mon Sep 17 00:00:00 2001 From: Zeke Foppa Date: Tue, 21 Apr 2026 14:49:02 -0700 Subject: [PATCH 1/2] [bfops/ci-helptext]: CI helptext --- tools/ci/src/ci_docs.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/ci/src/ci_docs.rs b/tools/ci/src/ci_docs.rs index f09114e6787..5270d8e88c4 100644 --- a/tools/ci/src/ci_docs.rs +++ b/tools/ci/src/ci_docs.rs @@ -46,12 +46,19 @@ fn generate_markdown(cmd: &mut Command, heading_level: usize) -> String { .map(|l| format!("--{}", l)) .or_else(|| arg.get_short().map(|s| format!("-{}", s))) .unwrap_or_else(|| arg.get_id().to_string()); - let help = arg.get_long_help().unwrap_or_default(); + let help = arg + .get_long_help() + .or_else(|| arg.get_help()) + .map(|help| help.to_string()) + .unwrap_or_else(|| { + eprintln!("Warning: argument `{}` is missing help text", arg.get_id())); + "" + }); options.push_str(&format!( "- `{}`: {}\n{}", names, help, - if help.to_string().lines().count() > 1 { "\n" } else { "" } + if help.lines().count() > 1 { "\n" } else { "" } )); } From 1c9d9b2f93df834d75da56c9a317324f11475737 Mon Sep 17 00:00:00 2001 From: Zeke Foppa Date: Tue, 21 Apr 2026 14:49:41 -0700 Subject: [PATCH 2/2] [bfops/ci-helptext]: WIP --- tools/ci/README.md | 10 +++++----- tools/ci/src/ci_docs.rs | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/ci/README.md b/tools/ci/README.md index c01598359e7..289f5336208 100644 --- a/tools/ci/README.md +++ b/tools/ci/README.md @@ -103,7 +103,7 @@ Usage: smoketests [OPTIONS] [ARGS]... [COMMAND] When specified, tests will connect to the given URL instead of starting local server instances. Tests that require local server control (like restart tests) will be skipped. - `--dotnet`: -- `args`: +- `args`: Additional arguments to pass to the test runner - `--help`: Print help (see a summary with '-h') #### `prepare` @@ -130,7 +130,7 @@ Usage: check-mod-list **Options:** -- `--help`: +- `--help`: Print help #### `help` @@ -141,7 +141,7 @@ Usage: help [COMMAND]... **Options:** -- `subcommand`: +- `subcommand`: Print help for the subcommand(s) ### `update-flow` @@ -193,7 +193,7 @@ Usage: global-json-policy **Options:** -- `--help`: +- `--help`: Print help ### `help` @@ -204,7 +204,7 @@ Usage: help [COMMAND]... **Options:** -- `subcommand`: +- `subcommand`: Print help for the subcommand(s) --- diff --git a/tools/ci/src/ci_docs.rs b/tools/ci/src/ci_docs.rs index 5270d8e88c4..eb77233d0cc 100644 --- a/tools/ci/src/ci_docs.rs +++ b/tools/ci/src/ci_docs.rs @@ -51,8 +51,8 @@ fn generate_markdown(cmd: &mut Command, heading_level: usize) -> String { .or_else(|| arg.get_help()) .map(|help| help.to_string()) .unwrap_or_else(|| { - eprintln!("Warning: argument `{}` is missing help text", arg.get_id())); - "" + eprintln!("Warning: argument `{}` is missing help text", arg.get_id()); + "".to_string() }); options.push_str(&format!( "- `{}`: {}\n{}",