dotnet / dotnet/command-line-api
Why are commands validated before options and arguments?
- Lenguaje dominante
- C#
- Estrellas
- 3.7k
- Forks
- 428
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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.
Guía de contribución
Línea de trabajo
No se menciona ningún archivo ni prueba. Empieza por rastrear el flujo de validación de comandos y dónde se omite la validación de opciones y argumentos después de errores de comandos. Compara el comportamiento actual con el escenario de fecha de nacimiento y fecha de contratación; se considera terminado cuando la validación informa de errores relevantes de opciones y argumentos incluso cuando la validación del comando también falla.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp
- Área
- cli
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100