dotnet / dotnet/command-line-api
Why are commands validated before options and arguments?
- Vorherrschende Sprache
- C#
- Sterne
- 3.7k
- Forks
- 428
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Scenario:
* Command with a birth date and a hire date
* The hire date must be in the last 20 years (young company)
* The hire date must be after the birth date
I think in this, and in most cases where options and arguments are involved in command validation, validating the options and arguments first makes sense.
In the current code (via reading) the command validation happens first, and if there are command validation errors options and arguments are not validated. I think we should reverse this, or at least remove the short circuit if the command validation fails.
Beitragsleitfaden
Rechercherichtung
Es wird keine Datei und kein Test genannt. Beginne damit, den Pfad der Befehlsvalidierung nachzuverfolgen und zu untersuchen, wo die Validierung von Optionen und Argumenten nach Befehlsfehlern übersprungen wird. Vergleiche das aktuelle Verhalten mit dem Szenario für Geburtsdatum und Einstellungsdatum; als erledigt gilt die Aufgabe, wenn die Validierung relevante Fehler für Optionen und Argumente meldet, selbst wenn die Befehlsvalidierung ebenfalls fehlschlägt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp
- Bereich
- cli
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100