GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix analyzer diagnostics and preserve PowerShell formatting by HuffmanStacks · Pull Request #2301 · PowerShell/PSScriptAnalyzer

Conversation

@HuffmanStacks

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

Uh oh!

There was an error while loading. Please reload this page.

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.

  • Put missing BOM diagnostics at line 1, column 1. Fixes Missing line number in rule PSUseBOMForUnicodeEncodedFile #1859.
  • Respect disabled pipeline binding and allow an end block to consume $input intentionally. Fixes UseProcessBlockForPipelineCommand returns a warning when pipeline behavior is explicitly disabled #1725 and [Repost] PSUseProcessBlockForPipelineCommand does not recognize use of $input within an End block #1915.
  • Report an empty custom rule path through WriteError so Get-ScriptAnalyzerRule honors -ErrorAction. Fixes Get-ScriptAnalyzerRule throws exception despite common parameter '-ErrorAction SilentlyContinue' is defined #1876.
  • Apply the inner-brace whitespace rule consistently to both sides of nonempty hashtables. Fixes PSUseConsistentWhitespace CheckInnerBrace - false positive on hashtable closing brace #1742.
  • Preserve existing LF and CRLF separators in mixed-ending scripts and use the first separator style for inserted lines. Fixes Cannot determine line endings as the text probably contain mixed line endings. #2074.
  • Match Cred and Creds as identifier words and document the credential-name matching rules. Fixes Any variable containing the word "credit" triggers PSAvoidUsingPlainTextForPassword #1886 and AvoidUsingPlainTextForPassword docs do not cover all checked parameter names #1565.
  • Replace numbered rule-index link labels with stable names while keeping all 80 link destinations. Fixes The new docs\Rules\README.md format causes merge issues #2220.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Christopher Huffman (HuffmanStacks) added 7 commits November 8, 2026 02:52
@HuffmanStacks
Locate missing BOM diagnostics at the start of the file
7c4e937
Addresses PowerShell#1859.
@HuffmanStacks
Honor pipeline binding values and intentional end-block processing
cc24bc9
Addresses PowerShell#1725 and PowerShell#1915.
@HuffmanStacks
Respect ErrorAction when a custom rule path has no rules
acd830c
Addresses PowerShell#1876.
@HuffmanStacks
Format both sides of nonempty hashtable braces
88309fd
Addresses PowerShell#1742.
@HuffmanStacks
Preserve mixed line endings while formatting
aa781d7
Addresses PowerShell#2074.
@HuffmanStacks
Recognize credential abbreviations as identifier words
c71b8fa
Addresses PowerShell#1886 and PowerShell#1565.
@HuffmanStacks
Use stable reference labels in the rule documentation index
c7988e0
Addresses PowerShell#2220.
@HuffmanStacks
Christopher Huffman (HuffmanStacks) requested review from a team, Christoph Bergmeister (bergmeister) and Mikey Lombardi (He/Him) (michaeltlombardi) as code owners November 8, 2026 08:06
Copilot AI balanced review requested due to automatic review settings November 8, 2026 08:06
Copilot AI reviewed Nov 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@HuffmanStacks

Christopher Huffman (HuffmanStacks) commented Nov 8, 2026

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@michaeltlombardi Mikey Lombardi (He/Him) (michaeltlombardi) Awaiting requested review from michaeltlombardi michaeltlombardi is a code owner
@bergmeister Christoph Bergmeister (bergmeister) Awaiting requested review from bergmeister bergmeister is a code owner

At least 1 approving review is required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Any variable containing the word "credit" triggers PSAvoidUsingPlainTextForPassword Get-ScriptAnalyzerRule throws exception despite common parameter '-ErrorAction SilentlyContinue' is defined Missing line number in rule PSUseBOMForUnicodeEncodedFile PSUseConsistentWhitespace CheckInnerBrace - false positive on hashtable closing brace UseProcessBlockForPipelineCommand returns a warning when pipeline behavior is explicitly disabled
Cannot determine line endings as the text probably contain mixed line endings. The new docs\Rules\README.md format causes merge issues

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@HuffmanStacks
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.