Skip to content
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 PowerShell accelerator for SuppressMessageAttribute #514

Closed
rkeithhill opened this issue Apr 24, 2016 · 2 comments
Closed

Add PowerShell accelerator for SuppressMessageAttribute #514

rkeithhill opened this issue Apr 24, 2016 · 2 comments

Comments

@rkeithhill
Copy link
Contributor

It is well within the norm for PowerShell to define accelerators for common types to make it easier for PowerShell scripters to specify an attribute like ValidateSet or ValidateNotNull and not have to remember the full typename System.Management.Automation.ValidateSetAttribute.

Ditto for System.Diagnostics.CodeAnalysis.SuppressMessageAttribute. Please consider asking the PowerShell team to add the accelerator SuppressMessage for this type. It will make PowerShell scripts that need to use this attribute easier to write and read.

@joeyaiello
Copy link
Contributor

joeyaiello commented Apr 25, 2016

I agree that it might be useful super forward-looking, but today this will only help in the case where:

  • You're running PS 5.1+
  • The module you're running is using a SuppressMessageAttribute
  • You don't have Script Analyzer installed

Given all that, this is firmly within the realm of "nice to have" for me, and I'm not sure anything nice to have can make it in PS 5.1 right now. I'm going to place it on UserVoice, though, as something we might want to do in the future for PowerShell.

@rkeithhill
Copy link
Contributor Author

Sounds reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants