intellij-powershell
intellij-powershell copied to clipboard
Support suppressing individual PSScriptAnalyzer rules
For example, I find AvoidAlias rule to be particularly annoying, since I like my code to be concise.
I don't want to use Diagnostics.CodeAnalysis.SuppressMessageAttribute
in all my scripts just for that.
I think it will be great to do these things:
- Add an option to inspection settings to suppress the list of specified rules.
- Ideally, PowerShell plugin wouldn't just add one inspection, but add as many inspections as there are rules, and allow to disable them selectively using IDEA's "Disable inspection" quickfix action.
- If 2 isn't possible, at least indicate the name of the rule in the message in order to enable using 1.
Depends on
- [ ] #140
Thanks for the suggestion! It looks useful.
Maintainer of PSScriptanalyzer here 👋🏻 The intellij extension seems to use PowerShellEditorServices, which has a default set of hard-coded rules here. You can use a PSScriptAnalyzer settings file for what you want, which PowerShellEditorServices supports as well, not sure if the intellij extension provides a way to exposes this API to the user.
Marking this as blocked on #140 for now.