You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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
orValidateNotNull
and not have to remember the full typenameSystem.Management.Automation.ValidateSetAttribute
.Ditto for
System.Diagnostics.CodeAnalysis.SuppressMessageAttribute
. Please consider asking the PowerShell team to add the acceleratorSuppressMessage
for this type. It will make PowerShell scripts that need to use this attribute easier to write and read.The text was updated successfully, but these errors were encountered: