PowerShell / PowerShell/platyPS

Synopsis set to placeholder when description is missing

Open
#860 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
871
Forks
166
Avg merge
21h 17m
Merged PRs (30d)
1

Description

Prerequisites
  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.
Steps to reproduce

Issue - synopsis without description:

function Synopsis {
<#
.SYNOPSIS
demo
#>
param()
}

(Get-help Synopsis).Synopsis
demo
(New-CommandHelp (Get-Command Synopsis)).Synopsis
{{ Fill in the Synopsis }}

With description:

function SynopsisAndDesc {
<#
.SYNOPSIS
demo
.DESCRIPTION
demo desc
#>
param()
}

(Get-help SynopsisAndDesc).Synopsis
demo
(New-CommandHelp (Get-Command SynopsisAndDesc)).Synopsis
demo
Expected behavior
(Get-help Synopsis).Synopsis
demo
(New-CommandHelp (Get-Command Synopsis)).Synopsis
demo
Actual behavior
(Get-help Synopsis).Synopsis
demo
(New-CommandHelp (Get-Command Synopsis)).Synopsis
{{ Fill in the Synopsis }}
Error details

Environment data
Name                           Value
----                           -----
PSVersion                      7.6.4
PSEdition                      Core
GitCommitId                    7.6.4
OS                             Microsoft Windows 10.0.26200
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.4
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Version

1.0.3

Visuals

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the PowerShell examples with Get-help and New-CommandHelp, then trace the New-CommandHelp path that handles a missing .DESCRIPTION. Confirm the fix by ensuring the generated synopsis is "demo" rather than "{{ Fill in the Synopsis }}" for the Synopsis function, while the existing description case remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.