◐ Shell
clean mode source ↗

Fix for PSUseConsistantWhiteSpace when using statement is present by AlexandraDorey · Pull Request #2091 · PowerShell/PSScriptAnalyzer

@AlexandraDorey

PR Summary

The addition of an using statement can cause the PSUseConsistant white space to fail due to how the InternalVisit of the UsingStatementAst is implemented in a slightly different way than other ASTs. See issue 2089 for more details.

PR Checklist

@AlexandraDorey

@microsoft-github-policy-service agree

Alexandra Dorey added 2 commits

April 1, 2025 19:53

andyleejordan

Choose a reason for hiding this comment

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

Hey cool, good debugging. Read through your issue, I think you're right and this makes sense. Just approved the tests workflow.

@AlexandraDorey AlexandraDorey changed the title WIP - Fix for PSUseConsistantWhiteSpace when using statement is present Fix for PSUseConsistantWhiteSpace when using statement is present

Apr 1, 2025

bergmeister

bergmeister

bergmeister

Choose a reason for hiding this comment

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

Thanks, well done

Co-authored-by: Christoph Bergmeister <c.bergmeister@gmail.com>

@AlexandraDorey

Fixed the nits up, I'm not super familiar with github but I assume I can merge my commits into one commit when the PR merges or should I do that in by branch first? Otherwise should be good to merge once the tests run again :)

@andyleejordan