ValidateRange boundary type vs parameter type check
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
Direzione di ricerca
Non sono indicati file o test. Inizia individuando la gestione esistente di ValidateRange e i test delle regole dell’analizzatore, quindi esegui PSScriptAnalyzer su esempi che usano limiti interi con parametri double, float o decimal. Il lavoro è completato quando l’incoerenza produce una diagnostica dell’analizzatore e i casi segnalati hanno una copertura.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- C#
- Stelle
- 2.2k
- Fork
- 415
- Merge medio
- 13h 1m
- PR unite (30g)
- 2
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PowerShell/PSScriptAnalyzer
-
Up-for-Grabs
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
PowerShell/PSScriptAnalyzer#2213 · 2 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
PowerShell/PSScriptAnalyzer#2217 · 1 commento ·
-
PSUseConsistentIndentation double-indents attribute bodies that open a scriptblock (`[Attr({ … })]`) Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 70/100
PowerShell/PSScriptAnalyzer#2216 · 2 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
PowerShell/PSScriptAnalyzer#2211 ·
-
`PSPlaceOpenBrace` and `PSPlaceCloseBrace` leave trailing whitespace when expanding one-line blocks Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 70/100
PowerShell/PSScriptAnalyzer#2210 ·
Tutte le issue di PowerShell/PSScriptAnalyzer
Issue simili
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
sillsdev/languageforge-lexbox#2665 ·
-
bug documentation frontend
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
azurenoops/spin_agent#975 ·
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
SubtitleEdit/subtitleedit#15108 · 1 commento ·
-
area/docs-content Bug pulumi/docs
Difficoltà 1/5 1-3 ore Idoneità per principianti 94/100