Skip to content

Add missing Severity entry for Invoke-ScriptAnalyzer docs#2193

Open
liamjpeters wants to merge 2 commits into
PowerShell:mainfrom
liamjpeters:CmdletDocsUpdate
Open

Add missing Severity entry for Invoke-ScriptAnalyzer docs#2193
liamjpeters wants to merge 2 commits into
PowerShell:mainfrom
liamjpeters:CmdletDocsUpdate

Conversation

@liamjpeters

@liamjpeters liamjpeters commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

PR Summary

The -Severity parameter of the Invoke-ScriptAnalyzer command has 4 allowed values.

/// <summary>
/// IncludeRule: Array of the severity types to be enabled.
/// </summary>
[ValidateSet("Warning", "Error", "Information", "ParseError", IgnoreCase = true)]
[Parameter(Mandatory = false)]
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
public string[] Severity
{
get { return severity; }
set { severity = value; }
}
private string[] severity;

The docs are missing ParseError as an allowed value.

Fixes #2192

Does not conflict with #2190

PR Checklist

Copilot AI review requested due to automatic review settings July 20, 2026 10:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Invoke-ScriptAnalyzer cmdlet documentation to match the actual allowed -Severity values implemented in InvokeScriptAnalyzerCommand (including ParseError).

Changes:

  • Add ParseError to the documented valid values for -Severity.
  • Normalize the valid-values list formatting (remove trailing punctuation from Information).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/Cmdlets/Invoke-ScriptAnalyzer.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invoke-ScriptAnalyzer does not report a parse failure in a param() block caused by a missing parameter separator comma.

2 participants