PowerShell / PowerShell/PSScriptAnalyzer
Add Get-ScriptAnalyzerSetting cmdlet to generalize a way of displaying collections of rules
Personne n'a encore pris cette issue.
- Langage dominant
- C#
- Étoiles
- 2.2k
- Forks
- 414
- Merge moyen
- 13 h 1 min
- PR mergées (30 j)
- 2
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par examiner le comportement existant de Get-ScriptAnalyzerRule et l’exemple CmdletDesign PSD1 décrit dans l’issue. Définissez la manière dont Get-ScriptAnalyzerSetting doit gérer les jeux de paramètres Settings et Path, la sortie Configuration, ainsi que les règles incluses et exclues ; le travail est terminé lorsque les fichiers PSD1 intégrés comme ceux fournis par l’utilisateur produisent une sortie cohérente et documentée.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- powershell
- Domaine
- cli, tooling
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 25/100