Skip to content

Sync docs changes from docs repo - #2196

Open
sdwheeler wants to merge 8 commits into
PowerShell:mainfrom
sdwheeler:sdw-w591525-rule-sync-docs-src
Open

Sync docs changes from docs repo#2196
sdwheeler wants to merge 8 commits into
PowerShell:mainfrom
sdwheeler:sdw-w591525-rule-sync-docs-src

Conversation

@sdwheeler

@sdwheelersdwheeler commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Sync docs changes from docs repo

CopilotAI review requested due to automatic review settings July 23, 2026 17:57
@sdwheeler
sdwheeler requested review from a team and michaeltlombardi as code ownersJuly 23, 2026 17:57

CopilotAI 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

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

Comment threaddocs/Cmdlets/Test-ScriptAnalyzerSettingsFile.md Outdated
Comment threaddocs/Rules/AvoidDynamicallyCreatingVariableNames.md Outdated
Comment threaddocs/Rules/UseSingularNouns.md Outdated
Comment threaddocs/Rules/UseConsistentParametersKind.md
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@sdwheeler

Copy link
Copy Markdown
CollaboratorAuthor

@SeeminglyScience We can skip the failed docs test for now. Please merge.

@sdwheeler
sdwheelerforce-pushed the sdw-w591525-rule-sync-docs-src branch from 14d0c4f to 6806e84CompareJuly 23, 2026 18:57
@sdwheeler
sdwheelerforce-pushed the sdw-w591525-rule-sync-docs-src branch from 6806e84 to d04cdc6CompareJuly 23, 2026 23:05
@sdwheeler

Copy link
Copy Markdown
CollaboratorAuthor

@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.

@sdwheeler

Copy link
Copy Markdown
CollaboratorAuthor

Close/reopen

@sdwheelersdwheeler reopened this Jul 25, 2026
@sdwheeler

Copy link
Copy Markdown
CollaboratorAuthor

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

Sign up for freeto 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

@sdwheeler