natemcmaster/CommandLineUtils

The `Description` field of `VersionOptionFromMemberAttribute` is unused.

siegfriedpammer opened this issue · 1 comments

Describe the bug
The Description field of VersionOptionFromMemberAttribute is unused.

To Reproduce
Steps to reproduce the behavior:

  1. Using this version of the library: '3.1.0' and '4.0.0-beta.74'
  2. Use
using McMaster.Extensions.CommandLineUtils;
using System;

namespace HelpTextBug
{
    [Command(Name = "xyz", Description = "Description")]
    [HelpOption("-h|--help")]
    [VersionOptionFromMember("-v|--version", Description = "This is never shown.",
    MemberName = nameof(VersionText))]

    class Program
    {
        public static int Main(string[] args) => CommandLineApplication.Execute<Program>(args);

        public string VersionText => "This is the version text.";

        private int OnExecute(CommandLineApplication app) => 0;
    }
}
  1. With these arguments '--help'

Expected behavior

Options:
-  -v|--version  Show version information.
+  -v|--version  This is never shown.
  -h|--help     Show help information.

Seems like something that should be easy to fix. I would accept a pull request to fix it.