-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add -Suppress
parameter
#1914
Comments
Would you be willing to implement such functionality? Personally, I'd rather like to see such functionality in the VS-Code extension first on a per violation basis as a starter. There is also the trap of making things to easy where people suppress all violations without having looked at all of them in too much detail, which would strengthen my argument, that it should be easier to do that in the editor. |
You have a point there. At the other hand, as a person who added PSScriptAnalyzer to our CICD street, it is easier to explain users to suppress rules in there script with a |
I agree that suppression should happen in a per rule basis which we support today, suppression is also as a part of your script, there is more information in this blog https://devblogs.microsoft.com/scripting/psscriptanalyzer-deep-dive-part-2-of-4/ |
PSScriptAnalyzer might potentially
-Fix
my scripts, but that is not possible for every rule (especially where it concerns false positives, such as #1472) and sometimes the "fix" is unwanted. In such a case I would like to be able to easily suppress the (remaining) violations with a command like:(or something like:
-SuppressViolations
as there exist already some other-Suppress*
parameters)Where I would expect an as-narrow-as-possible suppression (using the
ConditionalAttribute
) for the SuppressMessageAttribute on the concerned (inner) function.The text was updated successfully, but these errors were encountered: