commandlineparser / commandlineparser/commandline

No error when parsing unknown arguments after verb

Offen
#818 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C#
Sterne
4.8k
Forks
478
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.