PowerShell / PowerShell/PSScriptAnalyzer
The rule PSUseShouldProcessForStateChangingFunctions is far too simple
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- C#
- Estrelas
- 2.2k
- Forks
- 414
- Merge médio
- 13h 1min
- PRs com merge (30d)
- 2
Descrição
You can't determine if a command is "State Changing" based purely on the verb. This is the sort of stuff that makes me SO upset at this module that I just want to throw it out -- it takes too much time to go through and review stuff when most of the warnings/errors are wrong.
For one example, I'm getting that warning on a bunch of XML document commands like "New-XElement" and "New-XAttribute" which obviously don't modify system state, they just create xml nodes and attributes which can at least hypothetically be added to a document in memory.
For another example, almost every single command in the ShowUI module uses the "New" verb to generate UI elements on windows, not to modify the system state.
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece revisando a regra PSUseShouldProcessForStateChangingFunctions e os casos relatados dos comandos New-XElement, New-XAttribute e ShowUI. Determine como a regra deve distinguir os comandos que criam elementos XML ou de UI na memória dos comandos que alteram o estado do sistema e, em seguida, adicione cobertura mostrando que os avisos de falsos positivos desapareceram.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- csharp, powershell
- Domínio
- devtools
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Precisa de esclarecimento
- Facilidade para iniciantes
- 35/100