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 — Add NoNewLine switch for Out-String cmdlet by iamraghavs · Pull Request #5056 · PowerShell/PowerShell Conversation
|
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Please remove extra line.
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.
Done as suggested
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.
Please add braces here.
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.
Added braces as suggested
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.
Please use one line formatting as above.
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 for pointing that out. Done!
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.
Please put NoNewLine and Sream parameters in different parameter sets as discussed in the Issue.
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.
Done. I have named the ParameterSets as NonStreamFormatting and StreamFormatting for want of a better name. Do suggest one if this is bad :)
I've also fixed-up the commit instead of adding a new one to keep it clean. Let me know if that is an inconvenience.
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.
Why we use space? I'd prefer to remove.
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.
I was not sure what example to give and hence followed the one in
It "Should accumulate the strings and returns them as a single string"
Will remove the space as suggested
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.
removed the space
Sorry, something went wrong.
There was an error while loading. Please reload this page.
d3a59c3 to
f17122a
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
We just need to make sure the documentation is updated to include the new parameter. |
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.
I'd prefer "NoNewlineFormatting".
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.
Nice. changing it now
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.
Please add the test for default parameter set:
$testArray | Out-String | Should Be "ab"
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.
If i am not wrong, this is the test for the default parameter set wherein newlines are added to the output. Is my understanding correct?
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! Yes, correct.
Closed.
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.
I think we should a test that Stream and NoNewLine in different parameter sets:
{$testarray | Out-String -NoNewLine -Stream } | ShouldBeErrorId "....."
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.
Sure. I was a bit unsure how to go about doing that. Thanks for helping out!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
f17122a to
cfd5ebd
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Please replace $($nl) with ${nl}
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.
Sure. Done :)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
cfd5ebd to
eb5cb2a
Compare
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.
@raghav710 Thanks for your contribution! Hope to see you around more.
One side note: It's recommended to push new commits to address comments instead of squashing new fixes into the existing commit. In this way, the change history is preserved and it's very helpful for code reviews.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Dongbo Wang (@daxian-dbw) Thanks for the note. Will follow that henceforth during code reviews. As an aside, do you think it is good to squash the commits after approval as that would keep the history clean in case there were multiple code comments. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@raghav710 We want keep the history while we review. Then we usually Squash and Merge for simple changes. But if the code is very complex, tricky and add big feature we keep all commits. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Michael Klement (@mklement0) We merged the PR but we can always bring Out-String and Out-File into line until RTM. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yaay! |
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.
There was an error while loading. Please reload this page.