GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Sync docs changes from docs repo by sdwheeler · Pull Request #2196 · PowerShell/PSScriptAnalyzer

Conversation

@sdwheeler

@sdwheeler Sean Wheeler (sdwheeler) commented Jul 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Sync docs changes from docs repo

  • Fixes Invoke-ScriptAnalyzer does not report a parse failure in a param() block caused by a missing parameter separator comma. #2192
  • Closes Add missing Severity entry for Invoke-ScriptAnalyzer docs #2193 - Duplicate PR
    • This PR includes the change from Liam and other edits to that article.
  • Fixes AB#591525
  • This PR also fixes the documentation Pester test for the rules docs

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot AI review requested due to automatic review settings July 23, 2026 17:57
@sdwheeler
Sean Wheeler (sdwheeler) requested review from a team and Mikey Lombardi (He/Him) (michaeltlombardi) as code owners July 23, 2026 17:57
Copilot started reviewing on behalf of Sean Wheeler (sdwheeler) July 23, 2026 17:57
View session
Copilot AI reviewed Jul 23, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Pull request overview

This PR syncs updated PSScriptAnalyzer documentation from the upstream docs repo, primarily refreshing built-in rule reference pages and cmdlet help pages. It also incorporates the docs change needed to address #2192/#2193 by documenting ParseError as an allowed -Severity value for Invoke-ScriptAnalyzer.

Changes:

  • Refresh rule docs to a more consistent structure (default state, clearer descriptions, examples, and “Configure rule” sections).
  • Update rules index (docs/Rules/README.md) to a new “Default state” model and add link references for maintainability.
  • Update cmdlet docs (including adding New-ScriptAnalyzerSettingsFile and Test-ScriptAnalyzerSettingsFile to the module landing page and documenting ParseError severity).

Reviewed changes

Copilot reviewed 85 out of 85 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docs/Rules/UseUTF8EncodingForHelpFile.md Expands rule doc with default state, examples, configuration guidance, and link refs.
docs/Rules/UseUsingScopeModifierInNewRunspaces.md Refreshes rule description/examples and adds configuration guidance section.
docs/Rules/UseToExportFieldsInManifest.md Clarifies guidance and adds config/suppression section.
docs/Rules/UseSupportsShouldProcess.md Rewrites description and adds “Default state” and config guidance.
docs/Rules/UseSingularNouns.md Reworks description/examples and adds structured parameters section.
docs/Rules/UseSingleValueFromPipelineParameter.md Adds default state + configuration and clarifies suppression guidance.
docs/Rules/UseShouldProcessForStateChangingFunctions.md Updates description, adds configure/suppression guidance, and normalizes link refs.
docs/Rules/UsePSCredentialType.md Expands description and adds configuration guidance section.
docs/Rules/UseProcessBlockForPipelineCommand.md Improves explanation and adds configure/suppression guidance.
docs/Rules/UseOutputTypeCorrectly.md Adds default state and config guidance + improves description and link refs.
docs/Rules/UseLiteralInitializerForHashtable.md Adds default state + configure/suppression guidance and improves examples.
docs/Rules/UseDeclaredVarsMoreThanAssignments.md Adds default state + configure/suppression guidance and improves explanations.
docs/Rules/UseCorrectCasing.md Adds example section and rewrites parameters documentation.
docs/Rules/UseConstrainedLanguageMode.md Major rewrite: adds consolidated restriction/remediation table, config + parameter docs, and link ref normalization.
docs/Rules/UseConsistentWhitespace.md Adds default state and expands/clarifies parameter descriptions and examples.
docs/Rules/UseConsistentParametersKind.md Rewrites overview and trims config section (now needs ParametersKind documented).
docs/Rules/UseConsistentParameterSetName.md Adds default state + guidance/notes and reorganizes configuration section.
docs/Rules/UseConsistentIndentation.md Adds default state, examples, and expands parameter documentation.
docs/Rules/UseCompatibleTypes.md Adds default state, new examples, and expands parameter descriptions.
docs/Rules/UseCompatibleSyntax.md Adds default state, examples, and expands parameter documentation.
docs/Rules/UseCompatibleCommands.md Adds default state, examples, and expands parameter documentation.
docs/Rules/UseCompatibleCmdlets.md Rewrites description/config guidance and adds suppression guidance and link ref.
docs/Rules/UseCmdletCorrectly.md Adds default state + config/suppression guidance and improves description.
docs/Rules/UseBOMForUnicodeEncodedFile.md Adds default state + examples and config/suppression guidance; switches to link refs.
docs/Rules/UseApprovedVerbs.md Adds default state + config/suppression guidance; improves description and examples.
docs/Rules/ShouldProcess.md Rewrites description, adds default state, and adds config/suppression guidance + link refs.
docs/Rules/ReviewUnusedParameter.md Adds default state + config/suppression guidance and reorganizes configuration docs.
docs/Rules/ReservedParams.md Adds default state + config/suppression guidance and improves description.
docs/Rules/ReservedCmdletChar.md Adds default state, expands reserved character explanation, and adds config/suppression guidance.
docs/Rules/README.md Replaces rules list table with “Default state” model and link-reference style.
docs/Rules/ProvideCommentHelp.md Rewrites description and adds structured config + parameter documentation.
docs/Rules/PossibleIncorrectUsageOfRedirectionOperator.md Adds default state + config/suppression guidance and improves description.
docs/Rules/PossibleIncorrectUsageOfAssignmentOperator.md Adds detailed explanation + implicit suppression section and adds config/suppression guidance + link refs.
docs/Rules/PossibleIncorrectComparisonWithNull.md Adds richer explanation/examples and adds config/suppression guidance + link refs.
docs/Rules/PlaceOpenBrace.md Adds default state, examples, and expands parameter documentation.
docs/Rules/PlaceCloseBrace.md Adds default state, examples, and expands parameter documentation.
docs/Rules/MissingTryBlock.md Adds default state, clarifies false-positive note, and normalizes link refs.
docs/Rules/MissingModuleManifestField.md Adds default state + config/suppression guidance; improves description and adds link refs.
docs/Rules/MisleadingBacktick.md Adds default state, adds examples, and adds config/suppression guidance.
docs/Rules/InvalidMultiDotValue.md Adds default state, improves description, and renames configuration section to “Configure rule”.
docs/Rules/DSCUseVerboseMessageInDSCResource.md Adds default state + config/suppression guidance and improves description.
docs/Rules/DSCUseIdenticalParametersForDSC.md Adds default state + config/suppression guidance and improves description.
docs/Rules/DSCUseIdenticalMandatoryParametersForDSC.md Adds default state + config/suppression guidance and improves description (including MOF fencing).
docs/Rules/DSCStandardDSCFunctionsInResource.md Adds default state, improves examples, and adds config/suppression guidance.
docs/Rules/DSCReturnCorrectTypesForDSCFunctions.md Adds default state, improves examples, and adds config/suppression guidance.
docs/Rules/DSCDscTestsPresent.md Adds default state + config/suppression guidance and improves description.
docs/Rules/DSCDscExamplesPresent.md Adds default state + config/suppression guidance and improves description.
docs/Rules/AvoidUsingWriteHost.md Adds default state + config/suppression guidance; rewrites description and normalizes links.
docs/Rules/AvoidUsingWMICmdlet.md Adds default state + config/suppression guidance and improves description and examples.
docs/Rules/AvoidUsingUsernameAndPasswordParams.md Adds default state + config/suppression guidance and improves description.
docs/Rules/AvoidUsingPositionalParameters.md Adds default state, examples, and restructures config + parameter docs.
docs/Rules/AvoidUsingPlainTextForPassword.md Adds default state + config/suppression guidance and adds SecureString link ref.
docs/Rules/AvoidUsingInvokeExpression.md Adds default state + config/suppression guidance and improves description.
docs/Rules/AvoidUsingEmptyCatchBlock.md Adds default state + config/suppression guidance and improves description.
docs/Rules/AvoidUsingDoubleQuotesForConstantString.md Adds default state + config/parameter docs and expands description.
docs/Rules/AvoidUsingDeprecatedManifestFields.md Adds default state + config/suppression guidance and improves description.
docs/Rules/AvoidUsingConvertToSecureStringWithPlainText.md Adds default state + config/suppression guidance and adds SecretStore recommendation link ref.
docs/Rules/AvoidUsingComputerNameHardcoded.md Adds default state + config/suppression guidance and improves description/examples.
docs/Rules/AvoidUsingCmdletAliases.md Adds default state + config/suppression guidance and adds examples.
docs/Rules/AvoidUsingBrokenHashAlgorithms.md Adds default state + config/suppression guidance and improves description.
docs/Rules/AvoidUsingArrayList.md Adds default state + config/parameter docs and updates references.
docs/Rules/AvoidUsingAllowUnencryptedAuthentication.md Adds default state + config/suppression guidance and improves description.
docs/Rules/AvoidTrailingWhitespace.md Adds default state + examples and config/suppression guidance.
docs/Rules/AvoidShouldContinueWithoutForce.md Adds default state + config/suppression guidance and adds link refs.
docs/Rules/AvoidSemicolonsAsLineTerminators.md Adds default state + config/parameter docs and improves description/examples.
docs/Rules/AvoidReservedWordsAsFunctionNames.md Adds default state + config/suppression guidance and normalizes links.
docs/Rules/AvoidOverwritingBuiltInCmdlets.md Adds default state, expands description/examples, and updates configuration guidance.
docs/Rules/AvoidNullOrEmptyHelpMessageAttribute.md Adds default state + config/suppression guidance and improves description.
docs/Rules/AvoidMultipleTypeAttributes.md Adds default state + config/suppression guidance and improves description.
docs/Rules/AvoidLongLines.md Adds default state, examples, and expands config + parameter docs.
docs/Rules/AvoidInvokingEmptyMembers.md Adds default state + config/suppression guidance and improves description and references.
docs/Rules/AvoidGlobalVars.md Adds default state + config/suppression guidance and expands description/examples.
docs/Rules/AvoidGlobalFunctions.md Adds default state + config/suppression guidance and improves description.
docs/Rules/AvoidGlobalAliases.md Adds default state + config/suppression guidance and improves description.
docs/Rules/AvoidExclaimOperator.md Adds default state, improves description, and expands config/parameter docs.
docs/Rules/AvoidDynamicallyCreatingVariableNames.md Adds default state, improves description, and restructures config/refs (contains one broken Learn link path).
docs/Rules/AvoidDefaultValueSwitchParameter.md Adds default state + config/suppression guidance and normalizes links.
docs/Rules/AvoidDefaultValueForMandatoryParameter.md Adds default state + config/suppression guidance and improves description.
docs/Rules/AvoidAssignmentToAutomaticVariable.md Adds default state + config/suppression guidance and improves description/examples.
docs/Rules/AlignAssignmentStatement.md Adds default state, improves examples, and expands config/parameter documentation.
docs/Cmdlets/Test-ScriptAnalyzerSettingsFile.md Adds/refreshes cmdlet help content (contains a small grammar error in Quiet description).
docs/Cmdlets/PSScriptAnalyzer.md Bumps help version and adds the new settings-file cmdlets to the landing page list.
docs/Cmdlets/New-ScriptAnalyzerSettingsFile.md Adds/refreshes cmdlet help content and improves structure/formatting.
docs/Cmdlets/Invoke-ScriptAnalyzer.md Refreshes examples/output formatting and documents ParseError as a valid -Severity value.
docs/Cmdlets/Invoke-Formatter.md Minor formatting tweak (blank line after synopsis heading).
Comments suppressed due to low confidence (1)

docs/Rules/UseConsistentParametersKind.md:56

  • The Parameters section documents only Enable, but the rule also supports a ParametersKind option. Without documenting it, users can't discover the setting or its valid values.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread docs/Cmdlets/Test-ScriptAnalyzerSettingsFile.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread docs/Rules/AvoidDynamicallyCreatingVariableNames.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread docs/Rules/UseSingularNouns.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread docs/Rules/UseConsistentParametersKind.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sdwheeler

Sean Wheeler (sdwheeler) commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Patrick Meinecke (@SeeminglyScience) We can skip the failed docs test for now. Please merge.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sdwheeler
Sean Wheeler (sdwheeler) force-pushed the sdw-w591525-rule-sync-docs-src branch 2 times, most recently from 6806e84 to d04cdc6 Compare July 23, 2026 23:05
@sdwheeler
Sean Wheeler (sdwheeler) requested a review from Christoph Bergmeister (bergmeister) as a code owner July 24, 2026 23:51
@sdwheeler

Sean Wheeler (sdwheeler) commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

Patrick Meinecke (@SeeminglyScience) The docs tests pass now. This latest failure was in an existing test that has passed on previous runs. I think this is a transient problem.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sdwheeler

Sean Wheeler (sdwheeler) commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

Close/reopen

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sdwheeler Sean Wheeler (sdwheeler) closed this Jul 25, 2026
@sdwheeler Sean Wheeler (sdwheeler) reopened this Jul 25, 2026
@sdwheeler

Sean Wheeler (sdwheeler) commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

Patrick Meinecke (@SeeminglyScience) I reran the build. Now it's failing in a different place in the Windows tests. The docs test pass.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bergmeister
Christoph Bergmeister (bergmeister) requested a balanced review from Copilot September 14, 2026 20:14
Copilot started reviewing on behalf of Christoph Bergmeister (bergmeister) September 14, 2026 20:15
View session
Copilot AI reviewed Sep 14, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

🟡 Changes recommended

Documentation validation contains no-op checks, and several examples and defaults contradict the implemented rules.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (1)

docs/Rules/DSCReturnCorrectTypesForDSCFunctions.md:125

  • This “noncompliant” class shows the correct return declarations for Set and Test, and merely omits Get, which belongs to PSDSCStandardDSCFunctionsInResource. It therefore does not illustrate incorrect return types for this rule; include all three methods with intentionally wrong return declarations.
  • Files reviewed: 86/86 changed files
  • Comments generated: 19
  • Review effort level: Balanced

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Tests/Documentation/RuleDocumentation.tests.ps1 Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Tests/Documentation/RuleDocumentation.tests.ps1 Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Tests/Documentation/RuleDocumentation.tests.ps1 Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread docs/Rules/AvoidLongLines.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread docs/Rules/AvoidOverwritingBuiltInCmdlets.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread docs/Rules/DSCUseIdenticalMandatoryParametersForDSC.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread docs/Rules/MisleadingBacktick.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread docs/Rules/MissingTryBlock.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread docs/Rules/PlaceCloseBrace.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread docs/Rules/UseConsistentWhitespace.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

bergmeister
Christoph Bergmeister (bergmeister) reviewed Sep 14, 2026
View reviewed changes

@bergmeister Christoph Bergmeister (bergmeister) left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Sean Wheeler (@sdwheeler) please have a look at more detailed Copilot review that I kicked off whether there is anything to add onto backlog as it would obviously need to be fixed in docs first. Otherwise happy because sync is sync

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sdwheeler
Sean Wheeler (sdwheeler) marked this pull request as draft September 17, 2026 15:14
@sdwheeler Sean Wheeler (sdwheeler) self-assigned this Sep 17, 2026
@sdwheeler
Sean Wheeler (sdwheeler) force-pushed the sdw-w591525-rule-sync-docs-src branch from e8809e5 to 2fbfbf6 Compare September 17, 2026 15:55
@sdwheeler
Sean Wheeler (sdwheeler) marked this pull request as ready for review September 17, 2026 21:37
@sdwheeler

Sean Wheeler (sdwheeler) commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

Christoph Bergmeister (@bergmeister) Mikey Lombardi (He/Him) (@michaeltlombardi) Ready to merge

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

michaeltlombardi
Mikey Lombardi (He/Him) (michaeltlombardi) approved these changes Sep 18, 2026
View reviewed changes
Sean Wheeler (sdwheeler) and others added 6 commits September 18, 2026 09:12
@sdwheeler @michaeltlombardi
Sync docs changes from docs repo
6fd02cb
@sdwheeler @michaeltlombardi
Apply suggestions from code review
47dca57
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@sdwheeler @michaeltlombardi
Add missing configuration parameter
215e86d
@sdwheeler @michaeltlombardi
Update docs test
49ef50c
@sdwheeler @michaeltlombardi
fix $ruleDocDirectory
be26858
@sdwheeler @michaeltlombardi
fix path to README
0f983bf
Sean Wheeler (sdwheeler) added 5 commits September 18, 2026 09:12
@sdwheeler @michaeltlombardi
Fix severity in rule.md
2217137
@sdwheeler @michaeltlombardi
fix severity in table
b16bc82
@sdwheeler @michaeltlombardi
Address Copilot feedback
433667b
@sdwheeler @michaeltlombardi
Fix pester test for docs
76ab6ae
@sdwheeler @michaeltlombardi
Restore files for new rules
589d74e
@michaeltlombardi
Mikey Lombardi (He/Him) (michaeltlombardi) force-pushed the sdw-w591525-rule-sync-docs-src branch from e857fc3 to 589d74e Compare September 18, 2026 14:13
@sdwheeler

Sean Wheeler (sdwheeler) commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

Christoph Bergmeister (@bergmeister) This is ready to merge

bergmeister reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bergmeister
Christoph Bergmeister (bergmeister) requested a balanced review from Copilot September 22, 2026 18:21
Copilot started reviewing on behalf of Christoph Bergmeister (bergmeister) September 22, 2026 18:25
View session
Copilot AI reviewed Sep 22, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Documentation tests have validation defects, and the cmdlet help version conflicts with the module version.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 2 Medium severity · 8 Low severity

Open (10)
  • Medium severity The implementation checks RootModule, NestedModules, and ScriptsToProcess; it does not check…
  • Medium severity The rule checks wildcard exports only for FunctionsToExport and CmdletsToExport; its…
  • Low severity Correct the documented desktop PowerShell fallback profile · New
  • Low severity Use the required flat Configure parameter layout · New
  • Low severity Document all password parameter matching behavior · New
  • Low severity Document static Console Write calls as detected · New
  • Low severity Fix the case-sensitive Further reading link · New
  • Low severity Limit the suppression description to supported expressions · New
  • Low severity Remove unsupported type-name casing coverage · New
  • Low severity Clarify UseOutputTypeCorrectly applies to advanced functions · New
Resolved since last review (17)
  • High severity This validation is currently a no-op because $targetFile is undefined. In addition, $ruleTable…
  • High severity $targetFile is never assigned, so it is $null and $isRuleFile is always false. Consequently,…
  • Medium severity Get-CimInstance is absent from the selected Ubuntu 18.04 / PowerShell 6.2.4 profile while present…
  • Medium severity Removing this comma makes the Test-TargetResource parameter block syntactically invalid, so the…
  • Medium severity The visitor also reports top-level Write-Host calls; it only skips calls nested in functions…
  • Medium severity The rule intentionally reports only when there are more than two positional arguments, but this…
  • Medium severity These are not the defaults implemented by the rule, and neither named profile is shipped.…
  • Medium severity core-7.0.0-windows is not a shipped settings profile, so this example causes…
  • Medium severity This purported noncompliant line is only 115 characters long, so it does not exceed the documented…
  • Medium severity This test only validates rows that already exist. If a rule's table row and link definition are…
  • Low severity The exception is reversed. The implementation skips the spacing check when the opening brace is…
  • Low severity The rule's optional empty-line check is for an empty line before a closing brace…
  • Low severity Correct the spelling of “without.”
  • Low severity The code line has no whitespace after the backtick, so it is actually compliant and does not…
  • Low severity The requirement applies to properties marked Key or Required; a property does not need both…
  • Low severity The code line has no trailing space after the backtick, so this “noncompliant” sample is identical…
  • Low severity Untyped parameters are valid and are not reported by this rule; it only rejects more than one type…

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread docs/Rules/AvoidOverwritingBuiltInCmdlets.md
Comment on lines +75 to +76
> The default value for `PowerShellVersion` is `core-6.1.0-windows` if PowerShell 6.1 or later is
> installed, and `desktop-5.1.17763.316-windows` if it's not.
Comment thread docs/Rules/AvoidUsingArrayList.md
Comment on lines 59 to 63
### Parameters

- `Enable`: **bool** (Default value is `$false`)

Enable or disable the rule during ScriptAnalyzer invocation.
Comment thread docs/Rules/AvoidUsingPlainTextForPassword.md
Comment on lines +15 to +18
This rule detects function or script parameters with password-related names that are declared with a
`string` type instead of the `SecureString` type. Password parameters that accept plaintext expose
passwords and can compromise your system's security. You shouldn't accept passwords as plain text.
Instead, use the [SecureString][01] type to store passwords securely.
Comment thread docs/Rules/AvoidUsingWriteHost.md
Comment on lines +15 to +16
This rule detects usage of `Write-Host` at script scope and in functions that don't use the `Show`
verb. `Write-Host` is designed to produce display-only output in the host, like printing colored
Comment thread docs/Rules/MisleadingBacktick.md

<!-- link references -->
[02]: ../using-scriptanalyzer.md
[03]: ../rules/avoidtrailingwhitespace.md
Comment thread docs/Rules/PossibleIncorrectUsageOfAssignmentOperator.md
Comment on lines +23 to +24
statements. However, it doesn't flag uses of `=` when the right hand side of the conditional uses
any commands or expressions.
Comment thread docs/Rules/UseCorrectCasing.md
Comment on lines +15 to +17
This rule detects inconsistent casing in cmdlet names, parameters, type names, keywords, and
operators. PowerShell is case-insensitive wherever possible, so the casing of cmdlet names,
parameters, keywords, and operators don't affect functionality.
Comment thread docs/Rules/UseOutputTypeCorrectly.md
Comment on lines +15 to +17
This rule detects when a function or script returns a different type than what is declared in the
`OutputType` attribute. A function should return values that match the types specified in its
`OutputType` attribute.
bergmeister
Christoph Bergmeister (bergmeister) approved these changes Sep 22, 2026
View reviewed changes
@bergmeister
Christoph Bergmeister (bergmeister) requested a review from Andy Jordan (andyleejordan) September 22, 2026 18:41
@bergmeister
Christoph Bergmeister (bergmeister) merged commit 411c3d0 into PowerShell:main Sep 22, 2026
4 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@iRon7 iRon7 mentioned this pull request Sep 29, 2026
The new docs\Rules\README.md format causes merge issues #2220
Open
@iRon7 iRon7 mentioned this pull request Oct 23, 2026
Add new AvoidUsingNewObject rule #2186
Open
6 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@bergmeister Christoph Bergmeister (bergmeister) bergmeister approved these changes
@michaeltlombardi Mikey Lombardi (He/Him) (michaeltlombardi) michaeltlombardi approved these changes
@andyleejordan Andy Jordan (andyleejordan) Awaiting requested review from andyleejordan

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@sdwheeler Sean Wheeler (sdwheeler)

Labels

None yet

Projects

None yet

Milestone

No milestone

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.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@sdwheeler @bergmeister @michaeltlombardi
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.