You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43-31
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ Installation
62
62
```powershell
63
63
Import-Module PSScriptAnalyzer
64
64
```
65
-
If you have previous version of PSScriptAnalyzer installed on your machine, you may need to override old binaries by copying content of [``~/ProjectRoot/PSScriptAnalyzer``] to PSModulePath.
65
+
If you have previous version of PSScriptAnalyzer installed on your machine, you may need to override old binaries by copying content of [``~/ProjectRoot/PSScriptAnalyzer``] to PSModulePath.
66
66
67
67
To confirm installation: run ```Get-ScriptAnalyzerRule``` in the PowerShell console to obtain the built-in rules
68
68
@@ -78,11 +78,11 @@ You can suppress a rule by decorating a script/function or script/function param
78
78
param()
79
79
80
80
Write-Verbose -Message "I'm making a difference!"
81
-
81
+
82
82
}
83
-
83
+
84
84
All rule violations within the scope of the script/function/parameter you decorate will be suppressed.
85
-
85
+
86
86
To suppress a message on a specific parameter, set the `SuppressMessageAttribute`'s `CheckId` parameter to the name of the parameter:
87
87
88
88
function SuppressTwoVariables()
@@ -100,45 +100,45 @@ Use the `SuppressMessageAttribute`'s `Scope` property to limit rule suppression
The above example demonstrates how to suppress rule violations for internal functions using the `SuppressMessageAttribute`'s `Scope` property.
112
112
113
113
You can further restrict suppression based on a function/parameter/class/variable/object's name by setting the `SuppressMessageAttribute's``Target` property to a regular expression. Any function/parameter/class/variable/object whose name matches the regular expression is skipped.
0 commit comments