PowerShell / PowerShell/PSScriptAnalyzer
PSAvoidTrailingWhitespace should ignore empty lines indented to match the current block
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
Currently, PSAvoidTrailingWhitespace checks all lines for trailing whitespace, even when that line is effectively empty and the "trailing" whitespace is actually leading whitespace for the current indentation level. If the recommended action is taken (remove the whitespace), then adding new code in those spots requires re-indenting that spot to the current code indentation level.
I propose that it should respect the current indentation level for an empty line and not generate a note for those lines, as long as they match the indentation of the current block of code.
What is the latest version of PSScriptAnalyzer at the point of writing
1.17.1, shipping with the vscode-powershell extension version 1.8.1
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 localizando a implementação da regra PSAvoidTrailingWhitespace e seus testes existentes. Reproduza o caso com uma linha vazia indentada até o nível atual do bloco e, em seguida, verifique se a indentação correspondente é ignorada, enquanto os espaços em branco à direita reais continuam sendo reportados. Está concluído quando o comportamento estiver coberto por testes e a regra distinguir esses casos.
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
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100