Skip to content

Cmdlet help snippet does not get generated inside of workflow blocks #1025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ricardogaspar2 opened this issue Sep 6, 2017 · 8 comments
Closed
Labels

Comments

@ricardogaspar2
Copy link

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.

@daviwil
Copy link
Contributor

daviwil commented Sep 6, 2017

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?

@ricardogaspar2
Copy link
Author

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

@ricardogaspar2
Copy link
Author

@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 ricardogaspar2 reopened this Oct 5, 2017
@daviwil
Copy link
Contributor

daviwil commented Oct 25, 2017

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

@daviwil daviwil changed the title Improvement: Auto-generated script documentation Cmdlet help snippet does not get generated inside of workflow blocks Oct 25, 2017
@daviwil daviwil added Area-General Issue-Bug A bug to squash. labels Oct 25, 2017
@daviwil daviwil added this to the Future milestone Oct 25, 2017
@Cirzen
Copy link

Cirzen commented Jan 24, 2018

@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.

@TylerLeonhardt
Copy link
Member

That's a reasonable ask. Good idea!

@JustinGrote
Copy link
Collaborator

JustinGrote commented Apr 22, 2020

The original ask was implemented with #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 #1025 (comment), or is the ## syntax considered sufficient enough to close?

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Apr 22, 2020
@SydneyhSmith
Copy link
Collaborator

SydneyhSmith commented Apr 23, 2020

Thanks will close the initial issue as fixed.

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

@SydneyhSmith SydneyhSmith added Community-Help and removed Needs: Maintainer Attention Maintainer attention needed! labels Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants