Add tab completion for Export-Counter -FileFormat parameter#3856
Add tab completion for Export-Counter -FileFormat parameter#3856TravisEz13 merged 2 commits intoPowerShell:masterfrom
Conversation
There was a problem hiding this comment.
This does not appear to be validating the format. Please correct the comment.
There was a problem hiding this comment.
We can remove IgnoreCase = true - it is by default.
ff1a99f to
094ba3c
Compare
There was a problem hiding this comment.
Since we have tab completion now, should they be spelled out? CommaSeperatedValues, TabSeperatedValues and BinaryLog?
There was a problem hiding this comment.
Had a chat with Jim. It is ok to keep them as is. Please open an issue on https://github.com/PowerShell/PowerShell-Docs/blob/staging/reference/5.1/Microsoft.PowerShell.Diagnostics/Export-Counter.md to explain what they mean.
There was a problem hiding this comment.
The file types are explained in the 'Description' section of the documentation. Did you want them in the 'Parameter' section as well?
There was a problem hiding this comment.
@MiaRomero Yes, please add them to the parameters section as well.
There was a problem hiding this comment.
I've opened issue MicrosoftDocs/PowerShell-Docs#1245 for this
There was a problem hiding this comment.
I think this test is not needed as it does not hit any code in the cmdlet. It hits Parameter Validation code paths.
There was a problem hiding this comment.
This line seems unnecessary.
There was a problem hiding this comment.
Please update comment, SetOuputFormat does not do any validation anymore.
|
@MiaRomero Please make your membership in the Microsoft Organization public. I sent instructions offline. #Resolved |
Please address @adityapatwardhan 's comments
|
@MiaRomero What is the status of this PR? |
SteveL-MSFT
left a comment
There was a problem hiding this comment.
please add a test case to TabCompletion.Tests.ps1
e3587dc to
6633eff
Compare
|
Hi @TravisEz13, |
There was a problem hiding this comment.
We try to avoid Should Be $true because it is difficult to understand what went wrong just reading the logs.
In this specific case, I would instead use:
$res.CompletionMatches.CompletionText -join ' ' | Should Be 'blg csv tsv'There was a problem hiding this comment.
There might be a problem with the element's order.
We can use the auxiliary output
There was a problem hiding this comment.
If order is a concern, pipe to sort first. But in this case, if order is not preserved, I would call that a bug.
There was a problem hiding this comment.
@lzybkr , thank you, I've made the change. Is it appropriate to go ahead and fix the other test cases in this file that use the same pattern? Or is that a separate issue/PR?
There was a problem hiding this comment.
If you see the pattern in other files, then maybe a new PR, otherwise this PR is fine.
There was a problem hiding this comment.
@MiaRomero Yes, please add them to the parameters section as well.
6633eff to
cfe301f
Compare
|
Please investigate test failure |
cfe301f to
45a5520
Compare
|
I pinged @MiaRomero about updating her profile in order to get the PR merged. |
|
@TravisEz13 thanks for the link, updated my profile. |
Uh oh!
There was an error while loading. Please reload this page.