PowerShell / PowerShell/PSScriptAnalyzer
UseShouldProcessForStateChangingFunctions should prove that a function changes system state.
Nessuno ha ancora preso questa issue.
- Lingua principale
- C#
- Stelle
- 2.2k
- Fork
- 414
- Merge medio
- 13h 1m
- PR unite (30g)
- 2
Descrizione
Right now, the UseShouldProcessForStateChangingFunctions rule only looks at the name of the function (the verb) in order to determine that the function changes system state.
I think the rule should look at the body of the function and see if the function uses other functions that changes system state before it issues a warning.
If not, then I think that functions with the "New" verb should not be considered as functions that change system state. A lot of functions from the community with the "New" verb do not change system state, but are actually just different forms of "New-Object". See, for example, the ShowUI module.
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.
Direzione di ricerca
Inizia con la regola UseShouldProcessForStateChangingFunctions e traccia il modo in cui attualmente utilizza i nomi delle funzioni per emettere avvisi. Verifica come la regola potrebbe ispezionare i corpi e le chiamate delle funzioni, incluso se escludere le funzioni New-verb quando non modificano lo stato del sistema. Il lavoro è completato quando la regola distingue le funzioni che modificano lo stato dalle funzioni di costruzione di oggetti senza basarsi esclusivamente sul verbo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp, powershell
- Ambito
- devtools
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100