PowerShell / PowerShell/PSScriptAnalyzer
Add Get-ScriptAnalyzerSetting cmdlet to generalize a way of displaying collections of rules
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
Summary of the new feature
As a user I want to be able to discover what rules are defined in a PSD1 file, especially those that are included with PSScriptAnalyzer. I would also like to point to any PSD1 file containing rules and get the same output.
Proposed technical implementation details (optional)
Example 1 - Get the settings in the CmdletDesign PSD1 file that is included with PSScriptAnalyer
Get-ScriptAnalyzerSetting -Settings CmdletDesign
The default output should be the same as running Get-ScriptAnalyzerRule on each rule in the PSD1.
Example 2 - Get the settings in the CmdletDesign PSD1 file and show the configuration
Get-ScriptAnalyzerSetting -Settings CmdletDesign -Configuration
Adding the configuration switch should display the rule name and any custom configuration settings for rules that allow configuration.
Example 3 - Get the settings in a user provided PSD1 file
Get-ScriptAnalyzerSetting -Path /path/to/myrules.psd1
The output should be the same and the Path parameter set should also allow the Configuration parameter.
Other considerations
If the PSD1 file can contain both inclusions and exclusions, then the out needs to indicate which rules are included and which are excluded. Consider grouping by include/exclude.
Current version = 1.20.0.
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 revisando el comportamiento existente de Get-ScriptAnalyzerRule y el ejemplo de CmdletDesign PSD1 descrito en el issue. Define cómo debe manejar Get-ScriptAnalyzerSetting los conjuntos de parámetros Settings y Path, la salida de Configuration y las reglas incluidas frente a las excluidas; se considera terminado cuando tanto los archivos PSD1 integrados como los proporcionados por el usuario producen una salida coherente y documentada.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- powershell
- Área
- cli, tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 25/100