-
Notifications
You must be signed in to change notification settings - Fork 378
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
Should rule severity be configurable ? #1515
Comments
How do you use |
Thanks @jegannathanmaniganadan for opening this issue, this is something we want to consider as we re-vamp the configuration options for PSSA 2.0 (our next major version). As @bergmeister mentioned it would still be great to know how you use the severity warnings in your work flow? |
@SydneyhSmith I am glad to hear that. My reasons are almost covered by @bergmeister .
This is not much I am concerned about. Given that the PSSA (with custom rules too) & VSCode performance is not great, I usually turn off PSSA in VScode.
CI is where I am trying to make difference. Grouping based on |
PSSA already has the $includeRule = ((Get-ScriptAnalyzerRule -Severity Error) + (Get-ScriptAnalyzerRule -Name PSAvoidUsingCmdletAliases)).RuleName Also: you can pipe the results of |
We have a tool that runs PSScriptAnalyzer as part of our Pull Request process. It will not let anything be checked in that has any Errors or Warnings. Ideally, we would like to disable the rule for just these cases, but #849 isn't available yet. |
I'd like to be able to change severity from Error to Warning for It'd be better to have a warning for this than disabling the rule all together. I'd rather do this: @{
Rules = @{
'PSAvoidUsingConvertToSecureStringWithPlainText' = @{
'Severity' = 'Warning'
}
}
} Than this: @{
ExcludeRules = @(
'PSAvoidUsingConvertToSecureStringWithPlainText'
}
} |
I'd like to start the discussion about having an option of adjusting rule severity. I am not sure how PSSA community decides rule severity while onboarding any new rules. But I personally think it would be nice if I am given an option to upgrade some of the rules to Error or vice-versa.
For example, I would really like to upgrade
PSAvoidGlobalVars, PSAvoidUsingWriteHost, PSAvoidUsingPlainTextForPassword
rules severity toError
within my organization. This would not be the case for everyone. Similarly, I would like to change some of them toInformation
.Let me know if this was something discussed and ignored for any reason.
The text was updated successfully, but these errors were encountered: