Open
Description
Currently there are quiet some reason to suppress a certain rule as e.g.:
- Not be able to (easily) work around an issue
- False positives
There are also a few reasons a rule suppression might get obsolete, e.g.:
- The script issue gets resolved
e.g. all theWrite-Host
cmdlet are been replaced which a different cmdlet - The script issue doesn't anymore apply
e.g. aPSReviewUnusedParameter
parameter get completely depreciated or a variable gets (also) used in scope - PSScriptAnalyzer update
e.g. a false positive might get fixed in a newer version of PSScriptAnalyzer
In all the situations I would like to be warned that there is a Diagnostics.CodeAnalysis.SuppressMessageAttribute
that is no longer required.
This will avoid a scenario were:
- Someone resolves an analyzer issue (e.g.
PSAvoidUsingWriteHost
) in a particular script but forgets to remove theSuppressMessageAttribute
from the annotations - Someone else updates the same script but unseen reintroduces the analyzer issue (e.g.
Write-Host
) again.