j-maly / CommandLineParser

Command line parser. Declarative arguments support. Rich set of argument types (switches, enums, files, etc...). Mutually exclusive arguments validations.
MIT License
137 stars 30 forks source link

Wrong display for ArgumentRequiresOtherArgumentsCertification #85

Open hypomaniak opened 10 months ago

hypomaniak commented 10 months ago

Hello

I am trying to use the ArgumentRequiresOtherArgumentsCertification attribute and noticed this:

If the parameters are not validated, the exception message is shown correctly:

Argument: p requires the following arguments: i.

When calling ShowUsage(), the result is different

Argument combinations remarks: Argument: requires the following arguments: i.

The name of the argument is missing.

I think I found where the fault lies in class ArgumentRequiresOtherArgumentsCertification, but I'm not sure: private string DefaultUsageDescription() { return string.Format(Messages.EXC_GROUP_ARGUMENTS_REQUIRED_BY_ANOTHER_ARGUMENT, _mainArgument, _argumentsRequiredForMainArgumentString); }

shouldn't it be like this?

private string DefaultUsageDescription() { return string.Format(Messages.EXC_GROUP_ARGUMENTS_REQUIRED_BY_ANOTHER_ARGUMENT, _mainArgumentString, _argumentsRequiredForMainArgumentString); }

Sorry if I don't use the correct way to report this, I am not used to report bugs on GitHub