platyPS
platyPS copied to clipboard
Links should throw warning/error on invalid character
Prerequisites
- [x] Write a descriptive title.
- [x] Make sure you are able to repro it on the latest version
- [x] Search the existing issues.
Steps to reproduce
Imagine the following function:
Function Get-Test {
<#
.SYNOPSIS
Outputs a greeting message.
.DESCRIPTION
This function outputs a greeting message.
.PARAMETER Name
The name of the person to greet.
.EXAMPLE
Get-Test -Name "World"
.NOTES
Additional information about the function
.LINK
- https://example.com/documentation
#>
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[string]$Name
)
Write-Output "Hello, $Name! This is a test function."
}
Creating a CommandHelp object using New-CommandHelp is allowed. The export command also successfully exports the result. Trying to import the file, throws an error: No metadata found in Get-Test.md
The reason is because how the HelpUri is added to the metadata:
---
document type: cmdlet
external help file: Get-Test-Help.xml
HelpUri: >-
https://example.com/documentation
-
Locale: en-US
Module Name: ''
ms.date: 07/14/2025
PlatyPS schema version: 2024-05-01
title: Get-Test
---
Expected behavior
Able to import the command help after generation.
Actual behavior
An error occurs.
Error details
Environment data
Name Value
---- -----
PSVersion 7.5.2
PSEdition Core
GitCommitId 7.5.2
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Version
1.0.0-preview5
Visuals
No response
This is a documentation issue for Comment-based Help. We need to clarify the format expectations for all comment-based help keywords.