Skip to content

Commit 4760db0

Browse files
author
Kapil Borle
committed
Fix rule suppression documentation
1 parent e919621 commit 4760db0

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
@@ -70,11 +70,11 @@ To confirm installation: run ```Get-ScriptAnalyzerRule``` in the PowerShell cons
7070
Suppressing Rules
7171
=================
7272

73-
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 (you may omit the `checkID` parameter):
73+
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:
7474

7575
function SuppressMe()
7676
{
77-
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSProvideCommentHelp")]
77+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSProvideCommentHelp", "")]
7878
param()
7979

8080
Write-Verbose -Message "I'm making a difference!"

0 commit comments

Comments
 (0)