PowerShell / PowerShell/PSScriptAnalyzer
Rule severity vs diagnostic severity
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
From https://github.com/PowerShell/PSScriptAnalyzer/issues/1610.
One consideration that comes up when authoring rules is:
- Rules can have a "severity"
- The individual diagnostics can also have a "severity"
When we configure things, this creates the issue of:
- Does a configured severity refer to a filter on rules or diagnostics?
- If it's rules, how do rules perform broad analysis on a topic area and possibly output diagnostics of different severity?
- Should rules designate their severity as the highest severity they may emit? If so, how do we enforce that statically?
- If it's diagnostics, how do we ensure rules are run efficiently? If we can't statically determine ahead of time which rules will emit diagnostics of the right severity, are we forced to always run all the rules?
We could potentially offer both configurations, but I personally think this is an unhelpful level of granularity to offer to users, since we should work to make the concept of Severity a simple and monolithic one.
My current view on this is:
- Configured severity refers to rules to run
- Rules should be marked with the highest severity they can emit
- We should run all such rules and then filter out any diagnostics of unwanted severities
But that's just while I'm thinking on it now, and I'd like to open this question up for discussion
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 leyendo el issue #1610 de PSScriptAnalyzer enlazado y la discusión sobre la severidad aquí. Determina si el proyecto ya tiene una regla o una configuración de severidad de diagnósticos existente en la que fundamentar la decisión; para darlo por terminado sería necesario contar con un modelo de severidad acordado y un alcance de implementación, y este issue no especifica ninguno de los dos.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp, powershell
- Área
- tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100