-
Notifications
You must be signed in to change notification settings - Fork 156
Closed
Labels
Resolution-By DesignThe reported behavior is by design.The reported behavior is by design.
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
I have a function with two parameters e.g.
function Get-Computer {
[CmdletBinding()]
param (
[string]
$ComputerName,
[System.Management.Automation.SwitchParameter]
$PassThru
)
Write-Output "Found $ComputerName"
}
When I rename the $PassThru
parameter to $Force
and update the help via:
Import-Module .\testmodule\test_module.psd1 -Force
Measure-PlatyPSMarkdown -Path .\testmodule\docs\test_module\*.md | Update-MarkdownCommandHelp -Path {$_.FilePath} -NoBackup
It updates the syntax under ### __AllParameterSets
correctly but does not remove the parameter block for the $PassThru
parameter under the ## PARAMETERS
heading.
This also occurs when I remove the $Force
parameter from the function and update the help file - the $Force
parameter block remains in the markdown file.
Expected behavior
Parameters that are no longer in the function are removed from the `## PARAMETERS` section of the markdown file.
Actual behavior
Renamed and removed parameters remain in the `## PARAMETERS` section of the markdown file.
Error details
Environment data
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 GA
Visuals
No response
Metadata
Metadata
Assignees
Labels
Resolution-By DesignThe reported behavior is by design.The reported behavior is by design.