GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||
GeezerVison is showing github.com — ReviewUnusedParameter: Do not trigger when MyInvocation.BoundParameters or PSCmdlet.MyInvocation.BoundParameters is used by jegannathanmaniganadan · Pull Request #1520 · PowerShell/PSScriptAnalyzer Conversation
|
| It "has no violations when using PSBoundParameters" { | |
| $ScriptDefinition = 'function Bound { param ($Param1) Get-Foo @PSBoundParameters }' | |
| $Violations = Invoke-ScriptAnalyzer -ScriptDefinition $ScriptDefinition -IncludeRule $RuleName | |
| $Violations.Count | Should -Be 0 | |
| } |
Also, when you use a closing keyword in the PR description it will close the referenced issue
https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with two small comments
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
- Add pester tests
|
Thanks both for your feedback. Christoph Bergmeister (@bergmeister) did not approve the PR, so requested review again.
Writing pester tests for testing PSSA rule behavior is the most easiest job I have come across :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good 😊
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
PSReviewUnusedParameter has false positive when using $MyInvocation.BoundParameters
There was an error while loading. Please reload this page.