Vscode-powershell: Cmdlet help snippet does not get generated inside of workflow blocks

Created on 6 Sep 2017  路  8Comments  路  Source: PowerShell/vscode-powershell

Just a request for improvement.

So far I didn't find a plugin or a way to auto-generate PowerShell scripts documentation. It would be great to have this automated.

Probably there is, but I was searching online and in this repo, and I didn't find anything.

Area-Snippets Issue-Bug

All 8 comments

Hey Ricardo, have you tried typing out a comment block above or inside of a PowerShell function? We automatically generate the help comment for you. See this changelog note for more details:

https://github.com/PowerShell/vscode-powershell/blob/master/CHANGELOG.md#new-dynamic-snippet-for-adding-comment-based-help-748

Are you looking for something different entirely?

No, I didn't see that. Thank you very much @daviwil !

@daviwil, I noticed that this trick is not possible to use in functions inside PowerShell workflows.
Do you know why?

Example:

workflow example {
    function f ([string] str) {
        return str
    }
}

@ricardogaspar2 Looks like we missed this case. I'll update the bug title. Thanks!

@daviwil Could you also add this for scripts as a whole? i.e where a script file starts with [CmdletBinding()] Param(...), typing "<#" above the CmdletBinding line would ideally trigger the same behaviour. Workaround is to wrap the entire contents of the file in a Function definition and then delete afterwards.

That's a reasonable ask. Good idea!

The original ask was implemented with https://github.com/PowerShell/vscode-powershell/pull/748 so you can type '##' anywhere to get the comment help block, and it works in workflow blocks.

@TylerLeonhardt @SydneyhSmith perhaps this should be retagged to an enhancement to trigger also in certain comment circumstances as requested by @Cirzen in https://github.com/PowerShell/vscode-powershell/issues/1025#issuecomment-360301800, or is the ## syntax considered sufficient enough to close?

Thanks will close the initial issue as fixed.

For the second request, this is currently being tracked with issue #769

Was this page helpful?
0 / 5 - 0 ratings

Related issues

daviwil picture daviwil  路  4Comments

AWahlqvist picture AWahlqvist  路  3Comments

lukegriffith picture lukegriffith  路  3Comments

guidooliveira picture guidooliveira  路  3Comments

MiYanni picture MiYanni  路  3Comments