Backport MSDocs changes by bergmeister · Pull Request #2085 · PowerShell/PSScriptAnalyzer
Comment on lines +19 to +23
| <!-- TODO | ||
| Ability to suppress was added in https://github.com/PowerShell/PSScriptAnalyzer/pull/1896 | ||
| Need documentation for how to configure suppression of this rule. | ||
| --> | ||
|
|
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my original PR I left this out because this comment relates more to work in MSDocs. Maybe a GitHub issue is a better place for it than a comment?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add this information in both repos before release. I couldn't figure out how to configure this. Can you provide an example?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suppression is not different that any other rule. For example [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidAssignmentToAutomaticVariable', '')] suppresses the rule and [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidAssignmentToAutomaticVariable', 'PID')] makes the suppression specific to assignment to $PID automatic variable
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.