Skip to content
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

Running Update-MarkdownHelp with no changes is adding CommonParameters #223

Closed
rkeithhill opened this issue Oct 28, 2016 · 6 comments
Closed
Labels
Help wanted Tag - Help wanted from the community to resolve this issue
Milestone

Comments

@rkeithhill
Copy link

BTW very well could be a problem with the initial new-markdownhelp not adding the common parameter info in the first place.

Steps to reproduce

Generate markdown with new-markdownhelp on advanced function.
Fill in placeholders.
Commit that
With no changes to the function run update-markdownhelp.

Expected behavior

No difference.

Actual behavior

[CommonParameters] was added to the syntax section.
image

image

Also curious that update removed a blank line.

Environment data

v0.7.2

@rkeithhill rkeithhill changed the title Running Update-Help with no changes is adding CommonParameters Running Update-MarkdownHelp with no changes is adding CommonParameters Oct 30, 2016
@rkeithhill
Copy link
Author

Also, I'm not using -AlphabeticParamsOrder yet Update-MarkdownHelp wants to put Confirm first rather than at the end before WhatIf.

@vors vors modified the milestone: 0.8.0 Nov 12, 2016
@vors vors added the Help wanted Tag - Help wanted from the community to resolve this issue label Dec 22, 2016
@BernieWhite
Copy link
Contributor

@vors @rkeithhill So the desired behaviour is to supress CommonParameters if it doesn't exist in an existing markdown document?

@rkeithhill
Copy link
Author

My primary complaint is that after you run New-MarkdownHelp, running Update-MarkdownHelp should not cause any changes to the markdown file if there have been no changes to the function sig. OTOH if I changed the function to an advanced function then the addition of common parameters by Update-MarkdownHelp would make sense.

@BernieWhite
Copy link
Contributor

@rkeithhill Thanks. That helped and I see the issue. Currently New-MarkdownHelp will never generate CommonParameters for functions regardless of [CmdletBinding()] usage.

Update-MarkdownHelp appears to be working as expected. Only adding CommonParameters when required.

@rkeithhill
Copy link
Author

Ah, so it's a New-MarkdownHelp issue then?

@BernieWhite
Copy link
Contributor

BernieWhite commented Dec 4, 2017

Yes, the markdown generated by New-MarkdownHelp is currently incomplete concerning CommonParameters and corrected by Update-MarkdownHelp.

@rkeithhill Will fixing New-MarkdownHelp address this issue?

Re: the blank line being removed in outputs sections see #319.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help wanted Tag - Help wanted from the community to resolve this issue
Projects
None yet
Development

No branches or pull requests

3 participants