ValidateRange boundary type vs parameter type check
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
Línea de trabajo
No se nombran archivos ni pruebas. Empieza por localizar el manejo existente de ValidateRange y las pruebas de las reglas del analizador, y luego ejecuta PSScriptAnalyzer con ejemplos que usen límites enteros y parámetros double, float o decimal. Se considera terminado cuando la inconsistencia produce un diagnóstico del analizador y existe cobertura para los casos notificados.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary of the new feature
For ValidateRange, check that the boundary type match the parameter types. The reason is that integer literals silently accepts values outside the declared range on [double], [float], [decimal] types
A clear and concise description of what the problem is that the new feature would solve.
Try formulating it in user story style (if applicable):
I wrote it up in this article
https://www.reddit.com/r/PowerShell/comments/1vbsyfc/til_validaterange_with_integer_literals_silently/
Proposed technical implementation details (optional)
A clear and concise description of what you want to happen.
I'd like to see the PSScriptAnalyzer highlight an inconsistency in types in the same way that it does for other errors.
This would be shown in the output list when you run it against a script.
What is the latest version of PSScriptAnalyzer at the point of writing
1.25
- Lenguaje dominante
- C#
- Estrellas
- 2.2k
- Forks
- 415
- Merge medio
- 13 h 1 min
- PR fusionados (30 d)
- 2
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de PowerShell/PSScriptAnalyzer
-
Up-for-Grabs
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
PowerShell/PSScriptAnalyzer#2213 · 2 comentarios ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
PowerShell/PSScriptAnalyzer#2217 · 1 comentario ·
-
PSUseConsistentIndentation double-indents attribute bodies that open a scriptblock (`[Attr({ … })]`) Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 70/100
PowerShell/PSScriptAnalyzer#2216 · 2 comentarios ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
PowerShell/PSScriptAnalyzer#2211 ·
-
`PSPlaceOpenBrace` and `PSPlaceCloseBrace` leave trailing whitespace when expanding one-line blocks Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 70/100
PowerShell/PSScriptAnalyzer#2210 ·
Todos los issues de PowerShell/PSScriptAnalyzer
Issues similares
-
Status: Waiting triage Type: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
nanoframework/Home#1857 ·
-
kind/bug kind/regression
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
unoplatform/uno.toolkit.ui#1646 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nightscout/nocturne#1379 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
elastic/esql-dotnet#47 ·
-
port: add go-steam fork Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100