Skip to content

Conversation

@liamjpeters
Copy link
Contributor

@liamjpeters liamjpeters commented Oct 31, 2025

PR Summary

Fixes a small regression from #1704 where incorrectly cased parameters are reported as Functions/Cmdlets. i.e.

Get-Process -name 'Code'

Resulted in a diagnostic message of:

Function/Cmdlet '-name' does not match its exact casing 'Name'.

instead of:

Parameter '-name' of function/cmdlet 'Get-Process' does not match its exact casing 'Name'.

Added some tests for the messages.

Small tweaks to rule docs too, including that the descriptions of CheckCommands and CheckOperator were transposed.

Closes #2136

PR Checklist


## How

- Use exact casing for type names.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can't see anything in the rule which acts on type names

Copy link
Collaborator

@sdwheeler sdwheeler left a comment

Choose a reason for hiding this comment

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

Docs changes look good to me.

Copy link
Collaborator

@bergmeister bergmeister left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks, will go through your other PRs the next days. Sorry it's taken so long

Copy link
Member

@andyleejordan andyleejordan left a comment

Choose a reason for hiding this comment

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

Thanks!

@andyleejordan andyleejordan merged commit 4ad5980 into PowerShell:main Dec 3, 2025
4 checks passed
@liamjpeters liamjpeters deleted the #2136UseCorrectCasingDocs branch December 3, 2025 17:35
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.

PSUseCorrectCasing: operators casing treated differently

4 participants