Add support for ValidateRangeKind to ParameterMetadata.GetProxyAttributeData#9059
Add support for ValidateRangeKind to ParameterMetadata.GetProxyAttributeData#9059anmenaga merged 8 commits intoPowerShell:masterfrom indented-automation:master
Conversation
There was a problem hiding this comment.
Nicely done! I think it can be just a tad more robust, though!
There was a problem hiding this comment.
| RangeKind = kind; |
And with the above, this line wouldn't be needed.
There was a problem hiding this comment.
Implemented.
|
@indented-automation Please add tests. |
|
Sure. A new file in test\powershell\engine\Basic for ProxyCommand? |
|
This method is going to fall foul of the new constructor for ValidateSet. Would you like to handle that as part of this PR? Or in a separate PR? That change will be marginally more complex as the type used is discarded after the ValidateSet attribute is created at the moment. |
There was a problem hiding this comment.
Perhaps new test file must be in Basic folder.
|
Am I right in thinking I do not need to do anything about the quality failures? The suggestion is makes is not appropriate. |
|
If you ask about Codacy it reports false positives. Please ignore. |
|
@vexx32 can you please to another review for this? Thank you. |
|
This PR has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 10 days. |
|
@indented-automation Please rebase to get latest CI updates. |
|
@indented-automation looks like the merge pulled in some commits in a weird way. You might need to prune those commits out of the branch and do a proper rebase. Assuming you have a remote called 'upstream' you can do it all in one go with |
|
Well that messed it right up. Bear with me here, knew that rebase was a bit too easy. |
|
@indented-automation Thanks for your contribution! |
PR Summary
Fix #9058
PR Context
The GetParamBlock method of ProxyCommand throws an unhandled exception when RangeKind is used.
The attributes came from #4084:
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.[feature]to your commit messages if the change is significant or affects feature tests