commandlineparser / commandlineparser/commandline
No error when parsing unknown arguments after verb
Open
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 478
- PR merge metrics
- No merged PRs in 30d
Description
You can try this with your CLI program (replace `program.exe verb` as appropriate):
`program.exe verb unknownarg`
Replace unknownarg with any random inputs as long as they don't start with `-` and `Parser.Default.ParseArguments` will return `ParserResult.WithParsed`.
It doesn't matter what the value of `ParserSettings.IgnoreUnknownArguments` is.
I don't know if this is a bug or just hasn't been implemented but this is a fundamental problem with the built-in validation of this library.
Does anyone have any solutions to catch unknown args?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.