PowerShell / PowerShell/PSScriptAnalyzer
UseShouldProcessForStateChangingFunctions should prove that a function changes system state.
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
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.
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 con la regla UseShouldProcessForStateChangingFunctions y sigue cómo utiliza actualmente los nombres de las funciones para emitir advertencias. Investiga cómo la regla podría inspeccionar los cuerpos y las llamadas a funciones, incluido si deberían excluirse las funciones New-verb cuando no cambian el estado del sistema. Se considera terminado cuando la regla distingue las funciones que cambian el estado de las funciones de construcción de objetos sin depender únicamente del verbo.
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
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100