Change Get-Help cmdlet -Parameter parameter so it accepts string arrays.#8454
Change Get-Help cmdlet -Parameter parameter so it accepts string arrays.#8454adityapatwardhan merged 11 commits intoPowerShell:masterfrom
Conversation
iSazonov
left a comment
There was a problem hiding this comment.
We need PowerShell Committee approval to change the public API.
There was a problem hiding this comment.
Why we use the private variable? Why not public string[] Parameter { set; get; }
There was a problem hiding this comment.
This block of code seems very similar to code at line # 443. Can you refactor it into a method?
|
@sethvs Please fix style issues (excluding complex method). |
|
@iSazonov For some reason CodeFactor still shows lines with issues from the first commit. There are no such lines now. |
| if ((cat & supportedCategories) == 0) | ||
| { | ||
| if (!string.IsNullOrEmpty(Parameter)) | ||
| if (Parameter != null) |
There was a problem hiding this comment.
Could you please comment why we need the change?
There was a problem hiding this comment.
Parameter is a string array now.
|
@PowerShell/powershell-committee reviewed this and is ok with the change |
| /// <returns>Array of parameter infos.</returns> | ||
| private PSObject[] GetParameterInfo(HelpInfo helpInfo) | ||
| { | ||
| List<PSObject> parameterInfosList = new List<PSObject>(Parameter.Length); |
There was a problem hiding this comment.
We should consider moving Parameter != null checks to the method.
There was a problem hiding this comment.
I'm not sure that this is necessary.
Co-Authored-By: sethvs <sethvs@users.noreply.github.com>
|
@sethvs Can you please add tests for the new functionality? |
|
Error (no failed tests) with macOS check. |
|
macOS check throws Dependency precheck failed! |
|
Having a look. |
|
It seems that Bootstrap is failing with the following issue: @TravisEz13 any idea? |
PR Summary
Fix #8453
This PR changes
Get-Helpcmdlet -Parameter parameter so it accepts string arrays.Also changes
helpfunction.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.[feature]if the change is significant or affects feature tests