PowerShell / PowerShell/PSScriptAnalyzer
The rule PSUseShouldProcessForStateChangingFunctions is far too simple
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C#
- Estrellas
- 2.2k
- Forks
- 414
- Merge medio
- 13 h 1 min
- PR fusionados (30 d)
- 2
Descripción
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.
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.
Línea de trabajo
Comienza revisando la regla PSUseShouldProcessForStateChangingFunctions y los casos reportados de los comandos New-XElement, New-XAttribute y ShowUI. Determina cómo debería distinguir la regla los comandos que crean elementos XML o de UI en memoria de los comandos que cambian el estado del sistema y, después, añade cobertura que demuestre que las advertencias de falsos positivos han desaparecido.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp, powershell
- Área
- devtools
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 35/100