GeezerVison is showing github.com — WIP: Fix: PSUseConsistentWhitespace formatting for do-while, unary operators, and native commands by DrSkillIssue · Pull Request #2114 · PowerShell/PSScriptAnalyzer
Conversation
PR Summary
Fixes multiple whitespace formatting issues in PSUseConsistentWhitespace rule
Issues Fixed:
Changes Made:
Core Fixes:
- Added
FindKeywordAfterBraceViolations to handle keywords following closing braces
- Enhanced unary operator detection and spacing logic in
FindOperatorViolations
- Fixed
FindParameterViolations to skip whitespace inside string literals
- Added comma pattern detection in
FindSeparatorViolations for native command arguments
- Added the additional keywords to openParenKeywordAllowList:
Until, Do, Else, Catch, Finally
Tests Added:
- Added test-cases for the above-mentioned changes.
PR Checklist
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
SamErde and o-l-a-v reacted with thumbs up emoji
Dr. Skill Issue (DrSkillIssue)
changed the title
Fix: #2095 - UseConsistentWhitespace formatting for do-while/do-until loops and unary operators
WIP: Fix: #2095 - UseConsistentWhitespace formatting for do-while/do-until loops and unary operators
Jun 17, 2025
|
These PRs may just need closed as I couldn't reproduce the issues
PRs that were fixed with this PR
PRs that can be fixed in another PR(s) once this one is merged
Opting for multiple PRs as this one is large already.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Dr. Skill Issue (DrSkillIssue)
changed the title
WIP: Fix: #2095 - UseConsistentWhitespace formatting for do-while/do-until loops and unary operators
WIP: Fix: PSUseConsistentWhitespace formatting for do-while, unary operators, and native commands
Jun 17, 2025
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
Copilot will automatically review once the pull request is marked ready for review
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|