PowerShell / PowerShell/PSScriptAnalyzer
Parameter Help auto generation in PowerShell Functions
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
Prerequisites
- I have written a descriptive issue title.
- I have searched all issues to ensure it has not already been reported.
Summary
If you go above the parameter block of a function and write "##" the parameter help template is pre-generated automatically by the PowerShell Extension. However currently this generates:
<#
.SYNOPSIS
Short description
.DESCRIPTION
Long description
.PARAMETER exampleParam
Parameter description
.EXAMPLE
An example
.NOTES
General notes
#>
However, it is best practice to also specify the return value of your function by using ".OUTPUTS", therefore it would be nice if this could be added to the default template / if the default template could be configured in the settings.json.
Proposed Design
This could be accomplished by either:
Static Design
Add ".OUTPUTS" to the current template
Dynamic Design
Add the possibility to specify the fields in the template in a list like:
"powershell.extentention" : {
"parameterHelp" : {
"generatorTemplateFields" : [
".SYNOPSIS", ".DESCRIPTION", ".PARAMETER", ".EXAMPLE", ".NOTES", ".OUTPUTS"
]
}
}
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
Nenhum arquivo ou teste é especificado. Comece localizando o gerador de ajuda de parâmetros e as definições de configuração da extensão PowerShell; em seguida, compare o template existente com o campo .OUTPUTS proposto e a configuração generatorTemplateFields. Considera-se concluído quando .OUTPUTS for adicionado à ajuda gerada ou quando campos de template configuráveis forem documentados e implementados, com cobertura para o comportamento selecionado.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- powershell
- Domínio
- tooling
- Tipo de issue
- Funcionalidade
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 30/100