PowerShell / PowerShell/PSScriptAnalyzer
Add Get-ScriptAnalyzerSetting cmdlet to generalize a way of displaying collections of rules
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.2k
- Forks
- 414
- Avg merge
- 13h 1m
- Merged PRs (30d)
- 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing Get-ScriptAnalyzerRule behavior and the CmdletDesign PSD1 example described in the issue. Define how Get-ScriptAnalyzerSetting should handle the Settings and Path parameter sets, Configuration output, and included versus excluded rules; done means both built-in and user-provided PSD1 files produce consistent, documented output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100