Skip to content

Commit 49e3fbe

Browse files
authored
Merge pull request #848 from KevinMarquette/kevinmarquette/justification
Kevinmarquette/justification
2 parents 4c25c54 + fbc5046 commit 49e3fbe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,12 @@ Suppressing Rules
147147
=================
148148

149149
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).
150-
`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:
150+
`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:
151151

152152
``` PowerShell
153153
function SuppressMe()
154154
{
155-
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSProvideCommentHelp", "")]
155+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSProvideCommentHelp", "", Justification="Just an example")]
156156
param()
157157
158158
Write-Verbose -Message "I'm making a difference!"

0 commit comments

Comments
 (0)