-
Notifications
You must be signed in to change notification settings - Fork 511
Use correct casing for cmdlets affects keywords #5158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @DrDallas, thanks for your submission! This formatting comes from PSScriptAnalyzer. There was just a new release, could you try the vscode preview release (which includes the new release) and let us know if it continues? If so, use |
Per OP they're using the pre-release v2025.3.0, which means they have PSSA v1.24.0 and that means the @DrDallas you can do what you want with |
This issue has been labeled as resolved, please verify the provided fix (or other reason). |
This issue has been labeled as needing fix verification and has not had any activity a week. It has been closed for housekeeping purposes. |
Prerequisites
Summary
When the setting "Code Formatting : Use Correct Casing / Use correct casing for cmdlets" is enabled, keyword casing is changed.
For example, this code
gets changed to
The expected outcome is
This is expected because the setting is specific (in name) to cmdlets, and not keywords.
The suggested fix would be to include a setting for both cmdlets and keywords. An alternative solution would be to change the setting description to accurately describe that it changes the case for both cmdlets and keywords.
PowerShell Version
Visual Studio Code Version
Extension Version
Steps to Reproduce
Described in Summary section
Visuals
No response
Logs
No response
The text was updated successfully, but these errors were encountered: