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
But the intent of the first two parameters of the SuppressMessageAttribute constructor are to uniquely identify the suppressed rule, and to apply to a parameter would use the MessageId property e.g.:
So here is an example of how PSScriptAnalyzer is using this attribute to target a parameter:
But the intent of the first two parameters of the SuppressMessageAttribute constructor are to uniquely identify the suppressed rule, and to apply to a parameter would use the MessageId property e.g.:
So I would expect that every PowerShell suppression of a built-in rule would start like this:
This identifies the rule as a built-in rule. I could imagine custom rules would use their module/assembly name in the first field (category).
Suppression of a parameter should look like:
Note that MessageId is the field that is supposed to be used if Scope/Target aren't sufficiently precise.
The text was updated successfully, but these errors were encountered: