PowerShell / PowerShell/PSScriptAnalyzer
Configurable ParameterDescription Placement and Section Requirements in PSProvideCommentHelp
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- C#
- Estrelas
- 2.2k
- Forks
- 414
- Merge médio
- 13h 1min
- PRs com merge (30d)
- 2
Descrição
Summary of the new feature
As a user of PSScriptAnalyzer, I want to be able to configure where ParameterDescription comments appear and enforce required help sections (with optional order enforcement) in the PSProvideCommentHelp rule, so that I can align documentation with my project's standards and ensure consistency.
Proposed technical implementation details (optional)
-
Configurable ParameterDescription Placement
- Add a new configuration option for PSProvideCommentHelp called
ParameterDescriptionPlacementwith two possible values:WithCommentHelp(default): Parameter descriptions are included in the comment help block as today.InParamBlock: Parameter descriptions are placed as inline comments in the param block itself.
- The setting would control where parameter docs are generated and where the rule expects to find them.
- Add a new configuration option for PSProvideCommentHelp called
-
Required Sections and Order Enforcement
- Add a configuration option called
RequiredSections, accepting an array of section names (e.g.,["Synopsis", "Description", "Parameters"]). - Add a boolean configuration option
RequiredSectionsOrderMatters(default:false). If set totrue, the order of the sections in the array is enforced in the help comment, and the rule will fail if the order is incorrect. - If
RequiredSectionsOrderMattersis false, presence of all required sections is enforced, but order is not.
- Add a configuration option called
These options would give users more flexibility in how comment-based help is structured and validated.
What is the latest version of PSScriptAnalyzer at the point of writing
2024.6.0 (or latest at time of filing)
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 regra PSProvideCommentHelp e seu tratamento de configuração existente. Rastreie como as descrições de parâmetros e as seções de ajuda são encontradas atualmente e, em seguida, identifique os testes da regra antes de definir a cobertura para ParameterDescriptionPlacement, RequiredSections e RequiredSectionsOrderMatters. O trabalho estará concluído quando ambos os modos de posicionamento e a validação das seções obrigatórias, incluindo a ordenação opcional, forem aplicados de forma consistente.
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
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100