Skip to content

Wrong display for ArgumentRequiresOtherArgumentsCertification #85

@hypomaniak

Description

@hypomaniak

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions