Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tools/ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -130,7 +130,7 @@ Usage: check-mod-list

**Options:**

- `--help`:
- `--help`: Print help

#### `help`

Expand All @@ -141,7 +141,7 @@ Usage: help [COMMAND]...

**Options:**

- `subcommand`:
- `subcommand`: Print help for the subcommand(s)

### `update-flow`

Expand Down Expand Up @@ -193,7 +193,7 @@ Usage: global-json-policy

**Options:**

- `--help`:
- `--help`: Print help

### `help`

Expand All @@ -204,7 +204,7 @@ Usage: help [COMMAND]...

**Options:**

- `subcommand`:
- `subcommand`: Print help for the subcommand(s)


---
Expand Down
11 changes: 9 additions & 2 deletions tools/ci/src/ci_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
"".to_string()
});
options.push_str(&format!(
"- `{}`: {}\n{}",
names,
help,
if help.to_string().lines().count() > 1 { "\n" } else { "" }
if help.lines().count() > 1 { "\n" } else { "" }
));
}

Expand Down
Loading