#AvoidNullOrEmtpyHelpMessageAttribute Severity Level: Error
##Description
Setting the HelpMessage attribute to an empty string or null value causes PowerShell interpreter to throw an error while executing the corresponding function.
##How to Fix
To fix a violation of this rule, please set its value to a non-empty string.
##Example
Wrong:
Function BadFuncEmtpyHelpMessage { Param( [Parameter(HelpMessage="")] [String] $Param )
$Param
}
Correct:
Function GoodFuncEmtpyHelpMessage { Param( [Parameter(HelpMessage="This is help.")] [String] $Param )
$Param
}
0 commit comments