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 — Enable `Write-Information` to accept $null by SteveL-MSFT · Pull Request #8774 · PowerShell/PowerShell Conversation
|
|
The codefactor issue is in existing code that wasn't changed and also complaining about Hungarian notation which it isn't. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| } | ||
|
|
||
| It "Write-Information accespts `$Null" { | ||
| $null | Write-Information | Should -BeNullOrEmpty |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Rather than "NullOrEmpty", we should probably be specific about what this case does, and test it by checking the information stream for the result if possible.
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.
Not sure what you're proposing to check here. Previously it was returning a non-terminating error. I can change it to stop on error which would cause the test to fail without this change. The OrEmpty of the assertion only applies if the input is a string anyways.
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.
Write-Information doesn't write to pipeline so the test is misleading. It is more clear to check Information stream contains $null or check -NotThrow.
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.
Ok, I see what you guys are saying now. Will make a change.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
The codefactor issue is wrong |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Rob Holt (@rjmholt) Ilya (@iSazonov) Plase review this PR again when you get a chance. Thank you. |
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.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.