From 02b49e21fa918a1f78ef24ff903a764f984b57af Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 5 Jul 2026 17:12:39 +0000 Subject: [PATCH] fix(cli): correct and complete the generate command help The --format help listed only "json or markdown (alias: md)", omitting the built-in html format (declared in RendererCatalog.BuiltInFactories). The --layout help called it a "Markdown layout", but single/split apply to the html format too (only json is single-only). - --format: mention html alongside json and markdown. - --layout: describe it as a document layout and state which formats support it, instead of tying it to Markdown. - Mirror the same wording in the CliConfiguration doc comments. - Add the missing description on the `renderer add ` argument so it appears in --help. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_016y9NbS218s4nPXEUBvnf6W --- FirstClassErrors.Cli/CliConfiguration.cs | 4 ++-- FirstClassErrors.Cli/GenerateSettings.cs | 4 ++-- FirstClassErrors.Cli/RendererAddCommand.cs | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/FirstClassErrors.Cli/CliConfiguration.cs b/FirstClassErrors.Cli/CliConfiguration.cs index dd76283..90d0a5f 100644 --- a/FirstClassErrors.Cli/CliConfiguration.cs +++ b/FirstClassErrors.Cli/CliConfiguration.cs @@ -17,10 +17,10 @@ internal sealed class CliConfiguration { /// Default assemblies to document (used when neither --solution nor --assemblies is given). public List? Assemblies { get; set; } - /// Default output format (e.g. json, markdown). + /// Default output format (json, markdown or html). public string? Format { get; set; } - /// Default Markdown layout (single or split). + /// Default document layout (single or split); applies to the markdown and html formats. public string? Layout { get; set; } /// Default language of the generated documentation (e.g. en, fr, es, de, sv). diff --git a/FirstClassErrors.Cli/GenerateSettings.cs b/FirstClassErrors.Cli/GenerateSettings.cs index 5aa9afe..115683e 100644 --- a/FirstClassErrors.Cli/GenerateSettings.cs +++ b/FirstClassErrors.Cli/GenerateSettings.cs @@ -28,11 +28,11 @@ internal sealed class GenerateSettings : ConfigScopedSettings { public string? OutputPath { get; set; } [CommandOption("-f|--format ")] - [Description("Output format: json or markdown (alias: md). Falls back to the configuration, then json.")] + [Description("Output format: json, markdown (alias: md) or html. Falls back to the configuration, then json.")] public string? Format { get; set; } [CommandOption("--layout ")] - [Description("Markdown layout: single or split. Falls back to the configuration, then single.")] + [Description("Document layout: single or split. Applies to the markdown and html formats (json is single only). Falls back to the configuration, then single.")] public string? Layout { get; set; } [CommandOption("-l|--language ")] diff --git a/FirstClassErrors.Cli/RendererAddCommand.cs b/FirstClassErrors.Cli/RendererAddCommand.cs index 11aa342..76187e7 100644 --- a/FirstClassErrors.Cli/RendererAddCommand.cs +++ b/FirstClassErrors.Cli/RendererAddCommand.cs @@ -1,5 +1,6 @@ #region Usings declarations +using System.ComponentModel; using System.Reflection; using FirstClassErrors.GenDoc.Rendering; @@ -14,6 +15,7 @@ namespace FirstClassErrors.Cli; internal sealed class RendererReferenceSettings : ConfigScopedSettings { [CommandArgument(0, "")] + [Description("Path to the renderer library (.dll) to register; stored as given, so relative paths stay portable.")] public string LibraryPath { get; set; } = string.Empty; }