Skip to content

Fix analyzer diagnostics and preserve PowerShell formatting - #2301

Open
Christopher Huffman (HuffmanStacks) wants to merge 7 commits into
PowerShell:mainfrom
HuffmanStacks:fix/open-issue-batch-1
Open

Christopher Huffman (HuffmanStacks) wants to merge 7 commits into
PowerShell:mainfrom
HuffmanStacks:fix/open-issue-batch-1

Conversation

@HuffmanStacks

@HuffmanStacks Christopher Huffman (HuffmanStacks) commented Nov 8, 2026 •

Copy link
Copy Markdown

PR Summary

Make analyzer diagnostics more precise and preserve the layout of scripts when applying formatting corrections.

Contributed by Christopher Huffman (@HuffmanStacks) with Codex assistance.

Each change is in a separate commit for review.

Validation

  • 182 focused Pester tests passed on Linux with each of PowerShell 7.4.14 and 7.6.6.
  • The broader Linux suite passed 2,142 tests, with 163 skipped. Four tests failed on both the baseline and the branch because the runner could not resolve the PowerShell process path. All four CLI behaviors passed when replayed with the executable path.
  • The Engine and Rules assemblies were compiled with the .NET 8 SDK compiler. Windows and macOS validation is pending upstream CI.
  • PSScriptAnalyzer reported zero findings across five selected rules on the eight changed PowerShell files.

PR Checklist

  • Meaningful title and summarized changes
  • Existing source copyright headers retained
  • Regression tests and documentation updated where applicable

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@HuffmanStacks

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants