Fixes #453 - Improve description of the Settings parameter - #454
Conversation
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit 2d2d537: ✅ Validation status: passed
For more details, please refer to the build report. |
There was a problem hiding this comment.
Pull request overview
Updates PSScriptAnalyzer documentation to clarify what the -Settings parameter accepts (including built-in presets) and refreshes several cmdlet reference pages to newer PlatyPS front matter/schema.
Changes:
- Expands
-Settingsparameter documentation to include built-in preset names and adds a preset list. - Updates cmdlet reference page front matter/schema (HelpUri, PlatyPS schema version, Inputs/Outputs formatting).
- Updates the conceptual “Using PSScriptAnalyzer” article with additional guidance and examples around presets/settings.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| reference/ps-modules/PSScriptAnalyzer/Invoke-ScriptAnalyzer.md | Updates cmdlet reference content, including revised -Settings documentation and preset list. |
| reference/ps-modules/PSScriptAnalyzer/Invoke-ScriptAnalyzer.md.bak | Adds a backup copy of the cmdlet doc (appears unintended). |
| reference/ps-modules/PSScriptAnalyzer/Invoke-Formatter.md | Updates cmdlet reference front matter/schema and structured metadata sections. |
| reference/ps-modules/PSScriptAnalyzer/Invoke-Formatter.md.bak | Adds a backup copy of the cmdlet doc (appears unintended). |
| reference/ps-modules/PSScriptAnalyzer/Get-ScriptAnalyzerRule.md | Updates cmdlet reference front matter/schema and structured metadata sections. |
| reference/ps-modules/PSScriptAnalyzer/Get-ScriptAnalyzerRule.md.bak | Adds a backup copy of the cmdlet doc (appears unintended). |
| reference/docs-conceptual/PSScriptAnalyzer/using-scriptanalyzer.md | Updates conceptual guidance for settings/presets, including listing preset files and examples. |
Suppressed comments (7)
reference/ps-modules/PSScriptAnalyzer/Invoke-ScriptAnalyzer.md:628
-Settingsdocumentation currently states that invalid values are ignored and that multiple presets can be specified via a comma-separated list. In PSScriptAnalyzer,Settingsis a single object (preset name OR file path OR hashtable); unknown preset names are treated as a file path and ultimately error rather than being silently ignored.
The parameters and values in the profile take precedence over the same parameter and values
specified at the command line. Invalid values are ignored. You can specify multiple presets by
separating them with a comma. You can use tab completion to see the available presets.
reference/ps-modules/PSScriptAnalyzer/Invoke-ScriptAnalyzer.md:793
- The NOTES section repeats that multiple presets can be specified via a comma-separated list. If presets aren't composable this way, this sentence is misleading and should be removed.
You can specify multiple presets by separating them with a comma. You can use tab completion to see
the available presets.
reference/ps-modules/PSScriptAnalyzer/Invoke-ScriptAnalyzer.md:748
- Minor grammar issue: "accept a string values" should be singular/plural consistent.
The **Path** and **ScriptDefinition** parameters accept a string values from the pipeline.
reference/docs-conceptual/PSScriptAnalyzer/using-scriptanalyzer.md:188
- The sample output includes a specific username/module path ("C:\Users\sewhee\..."). Docs should avoid personal/user-specific paths; use placeholders to keep the example generic.
Directory: C:\Users\sewhee\Documents\PowerShell\Modules\psscriptAnalyzer\1.25.0\Settings
reference/ps-modules/PSScriptAnalyzer/Invoke-Formatter.md:182
- Minor spacing issue: there is an extra space in "accepts input from the pipeline".
The **Range** parameter accepts input from the pipeline.
reference/docs-conceptual/PSScriptAnalyzer/using-scriptanalyzer.md:181
-Settingsaccepts a single preset name (or a file path/hashtable). Saying multiple presets can be specified via comma-separated values is misleading here and should be removed.
You can specify multiple presets by separating them with a comma. You can use tab completion to see
the available presets. The built-in presets are stored in the `Settings` folder of the
**PSScriptAnalyzer** module. You can list the built-in presets by running the following command:
reference/docs-conceptual/PSScriptAnalyzer/using-scriptanalyzer.md:184
- The
Get-ChildItemexample has redundant$()nesting; this makes the example harder to read and doesn't change behavior.
Get-ChildItem "$($(Get-Module PSScriptAnalyzer).ModuleBase)\Settings\*.psd1"
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| --- | ||
| external help file: Microsoft.Windows.PowerShell.ScriptAnalyzer.dll-Help.xml | ||
| Module Name: PSScriptAnalyzer | ||
| ms.date: 07/23/2026 | ||
| online version: https://learn.microsoft.com/powershell/module/psscriptanalyzer/invoke-scriptanalyzer?view=ps-modules&wt.mc_id=ps-gethelp | ||
| schema: 2.0.0 | ||
| --- |
| --- | ||
| external help file: Microsoft.Windows.PowerShell.ScriptAnalyzer.dll-Help.xml | ||
| Module Name: PSScriptAnalyzer | ||
| ms.date: 10/07/2021 | ||
| online version: https://learn.microsoft.com/powershell/module/psscriptanalyzer/invoke-formatter?view=ps-modules&wt.mc_id=ps-gethelp | ||
| schema: 2.0.0 | ||
| --- |
| --- | ||
| external help file: Microsoft.Windows.PowerShell.ScriptAnalyzer.dll-Help.xml | ||
| Module Name: PSScriptAnalyzer | ||
| ms.date: 12/12/2024 | ||
| online version: https://learn.microsoft.com/powershell/module/psscriptanalyzer/get-scriptanalyzerrule?view=ps-modules&wt.mc_id=ps-gethelp | ||
| schema: 2.0.0 | ||
| --- |
|
Learn Build status updates of commit 28cd141: ✅ Validation status: passed
For more details, please refer to the build report. |
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
PR Summary
Improve description of the Settings parameter
PR Checklist