Rob Holt
Rob Holt
@fflaten what you're talking about is what I refer to as `comment-based suppression` above. Something like: ```powershell #|pssa:disable:PS/AvoidUsingWriteHost Write-Host "Hello" #|pssa:enable:PS/AvoidUsingWriteHost ```
Converting this to a draft while it remains a WIP
Rather than look at the invoking command, I would just build a dictionary from the param block of parameters to ignore when visiting a scriptblock
> Indent, and replaces keyword as if it was not in the keyword context. This is behaving as expected. `PSAvoidUsingCmdletAliases` also warns about and replaces implicit `Get`-prefix aliasing. In the...
We're actually already working toward this -- added a label to indicate that
Yeah I think the rule should handle the empty line by removing it. There are a bunch of issues around these formatting rules, mostly caused by the fact that they...
- The SuggestedCorrection suggestion seems like a good one. I can imagine that people who want whitespace up to the indented level will want a different correction though. - I...
I haven't verified this, but looking at the code I think it's a bit naive and should be fixed to look at the value: https://github.com/PowerShell/PSScriptAnalyzer/blob/359f98ffcca36704bc439e7572a0945e3f3eedce/Rules/UseProcessBlockForPipelineCommand.cs#L48-L49 It looks like it currently...
Ideally the rule could also warn of simple cases of variable (etc) provide manipulation
@sheldonhull what's the output of `Get-Module PSScriptAnalyzer` here? You have 1.19.1 installed, but is that the one that's loaded and running?