Skip to content

Conversation

DrSkillIssue
Copy link

@DrSkillIssue DrSkillIssue commented Jun 17, 2025

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

@DrSkillIssue 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
@DrSkillIssue
Copy link
Author

DrSkillIssue commented 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.

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

1 participant