PowerShell / PowerShell/PSScriptAnalyzer
Rule severity vs diagnostic severity
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- C#
- Estrelas
- 2.2k
- Forks
- 415
- Merge médio
- 13h 1min
- PRs com merge (30d)
- 2
Descrição
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
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 lendo a issue #1610 do PSScriptAnalyzer vinculada e a discussão sobre severidade aqui. Determine se o projeto já possui uma regra ou configuração de severidade de diagnóstico existente que possa servir de base para a decisão; para considerar o trabalho concluído, seria necessário um modelo de severidade acordado e um escopo de implementação, e esta issue não especifica nenhum dos dois.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- csharp, powershell
- Domínio
- tooling
- Tipo de issue
- Funcionalidade
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Status de atividade
- Estagnada
- Clareza
- Precisa de esclarecimento
- Facilidade para iniciantes
- 25/100