AutomaticHelpGenerator fails with NullPointer when [NamedArgument] has no Description
GeneThomas opened this issue · comments
Gene Thomas commented
class NoDescription
{
[NamedArgument("name")]
public string Name = null;
}
class Help: AutomaticHelpGenerator<NoDescription>
{
public Help()
{
ShortName = null;
LongName = "help";
}
}
[TestMethod]
[ExpectedException(typeof(ParserExit))]
public void Help_WithNoDescription_NoNullPointer()
{
var args = "--help".Split();
var opt = new NoDescription();
var parser = new CliParser<NoDescription>(
opt,
ParserOptions.None,
new Help());
parser.Parse(args);
}
pull request to follow...
Nemec commented
You fixed this one a while ago. Closing.