diff --git a/README.md b/README.md index 72478b593..877a2de68 100644 --- a/README.md +++ b/README.md @@ -147,12 +147,12 @@ Suppressing Rules ================= You can suppress a rule by decorating a script/function or script/function parameter with .NET's [SuppressMessageAttribute](https://msdn.microsoft.com/en-us/library/system.diagnostics.codeanalysis.suppressmessageattribute.aspx). -`SuppressMessageAttribute`'s constructor takes two parameters: a category and a check ID. Set the `categoryID` parameter to the name of the rule you want to suppress and set the `checkID` parameter to a null or empty string: +`SuppressMessageAttribute`'s constructor takes two parameters: a category and a check ID. Set the `categoryID` parameter to the name of the rule you want to suppress and set the `checkID` parameter to a null or empty string. You can optionally add a third named parameter with a justification for suppressing the message: ``` PowerShell function SuppressMe() { - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSProvideCommentHelp", "")] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSProvideCommentHelp", "", Justification="Just an example")] param() Write-Verbose -Message "I'm making a difference!"