PSScriptAnalyzer
PSScriptAnalyzer copied to clipboard
Download ScriptAnalyzer from PowerShellGallery
It's always been recommended to avoid using Write-Host because it outputs only to the console and not to any of the standard output streams. As of PowerShell 5.0, Write-Host is...
It appears that the documentation [UseCompatibleSyntax.md](https://github.com/PowerShell/PSScriptAnalyzer/blob/master/RuleDocumentation/UseCompatibleSyntax.md) is out of date. I say this because the markdown file lists 6.0 as the newest version that can be checked, but this page...
**Summary of the new feature** `[ScriptBlock]`s might contain both single and double quotes therefore it would makes sense to accept a `ScriptBlock` for the `-ScriptDefinition` parameter so that it isn't...
Before submitting a bug report: - Make sure you are able to repro it on the latest released version - Perform a quick search for existing issues to check if...
I keep getting warnings about implicitly aliasing which I feel are incorrect, but perhaps I'm missing something from my code. Steps to reproduce ------------------ ``` $Date = (get-date).AddDays(-14) Get-ADComputer -Properties...
**Summary of the new feature** Currently the `-Fix` parameter is mutual exclusive with the `-ScriptDefinition` parameter: ```PowerShell Invoke-ScriptAnalyzer -ScriptDefinition 'GCI *' -Fix ``` > `Invoke-ScriptAnalyzer: Parameter set cannot be resolved...
And self-apply in github workflows. ## PR Summary This allows easy integration with [pre-commit](https://pre-commit.com/) that can be use to validate/lint code before commit (and also after/server side as per github...
**Repost:** Hoping to get some clarification, since this was mechanically closed based on a factually incorrect response to #1912 . Steps to reproduce ------------------ ```PowerShell Invoke-ScriptAnalyzer -IncludeRule PSUseProcessBlockForPipelineCommand ` -ScriptDefinition...
**Summary of the new feature** Strings are immutable. Each addition to the string actually creates a new string big enough to hold the contents of both the left and right...
Background (excerpt from Wikipedea [**Quotation mark**](ttps://en.wikipedia.org/wiki/Quotation_mark) definition): > Regarding their appearance, there are two types of quotation marks: > >* '…' and "…" are known as neutral, vertical, straight, typewriter,...