📖 [Docs]: .INPUTS and .OUTPUTS format rules added to PowerShell function help standards#65
Merged
Marius Storhaug (MariusStorhaug) merged 8 commits intoJul 25, 2026
Conversation
…ards Document pipeline-input-only scope of .INPUTS, fully-qualified .NET type name convention for both sections, the 'None.' template when no pipeline input is accepted, per-type repetition of the keyword, and the PlatyPS single-line constraint. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
PlatyPS renders the type name as a ### heading - putting type and description on one line causes trailing-period MD026 violations in generated docs. Canonical format: type name alone on first line, description indented on the next line. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Update the Get-UserData snippet to use the two-line format, add the missing .INPUTS None block, and replace [PSCustomObject] with the fully-qualified System.Management.Automation.PSCustomObject type in both the comment-based help and [OutputType()]. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Official about_Comment_Based_Help and PowerShell/PowerShell source both use 'TypeName. Description.' on one line - not a two-line type/description split. Also revert [OutputType] to [PSCustomObject] (type literal, no full namespace needed in the attribute). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
PlatyPS 1.0.3 renders the first line of each .INPUTS/.OUTPUTS entry as a ### heading. Single-line 'TypeName. Description.' creates trailing-period MD026 violations and puts a full sentence in a heading. Two-line with indented description renders the description as a code block (4 spaces). Correct format for PlatyPS-based modules: type name only, no period, no inline description. Description goes in the generated markdown file. Also note the divergence from about_Comment_Based_Help single-line examples which work fine in Get-Help but not PlatyPS. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
PlatyPS v2 test confirms: type on first line, blank line, description as paragraph produces the cleanest markdown (clean ### heading, body text below). Update both the guidance section and the Get-UserData example. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
6 tasks
Show the blank-line format in the Rotate-Secret.ps1 code example, aligning Scripts with the Functions guidance. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Marius Storhaug (MariusStorhaug)
marked this pull request as ready for review
July 25, 2026 13:27
4 tasks
Marius Storhaug (MariusStorhaug)
deleted the
feat-ps-inputs-outputs-help-format
branch
July 25, 2026 13:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PowerShell comment-based help standards now include precise rules for writing
.INPUTSand.OUTPUTS— covering pipeline-only scope, fully-qualified .NET type names, the two-line type + description format, theNonetemplate, per-type keyword repetition, and how PlatyPS renders these sections.New:
.INPUTSand.OUTPUTSformatting rulesThe PowerShell Functions coding-standards page gains a dedicated sub-section under Comment-based help (required) that specifies exactly how to write these two sections:
.INPUTScovers pipeline input only — not all parameters. UseNone(as the type name) withYou can't pipe objects to <CommandName>.as the description when no pipeline input is accepted..OUTPUTSmust match[OutputType()]. Repeated once per return type for multi-type functions.System.String, not[string]).###heading.Technical Details
src/docs/Coding-Standards/PowerShell/Functions.mdSystem.String. Description.format after discovering the PlatyPS MD026 constraint.Related issues