-
Notifications
You must be signed in to change notification settings - Fork 394
Severity-filter works unexpected with custom script-rules #1610
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
Comments
This occurs because the PSSA looks at the rule and decides based on the set severity whether to run it (rather than running it and then filtering out the diagnostics): PSScriptAnalyzer/Engine/ScriptAnalyzer.cs Lines 1948 to 1978 in d945a41
There's no way to designate an external rule as having any severity other than PSScriptAnalyzer/Engine/Generic/ExternalRule.cs Lines 55 to 59 in d945a41
I have an open proposal for a rework of custom rules in PSSA in #1551 that you might like to look at. |
Thanks. I guess |
Using the
-Severity <level>
or similar setting inPSScriptAnalyzerSettings.psd1
doesn't work as expected with custom rules.Steps to reproduce
AnalyzerRules.psm1
Expected behavior
Actual behavior
Environment data
Same result in PowerShell 5.1
The text was updated successfully, but these errors were encountered: