-
Notifications
You must be signed in to change notification settings - Fork 384
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
Update compatibility profiles for PowerShell 7 #1429
Conversation
The rule can also be suppressed only for particular types: | ||
|
||
```powershell | ||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleTypes", "", Target="System.Management.Automation.Security.SystemPolicy")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be?
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleTypes", "", Target="System.Management.Automation.Security.SystemPolicy")] | |
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleTypes", "System.Management.Automation.Security.SystemPolicy")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but 1 or 2 minor comments probably need to be addressed. Also: I'd rather remove the 6.1 profiles as it's usage is unsupported anyway as it heavily adds to the installation payload of PSSA. By the time PSSA ships, even 6.2 will only have a few months support left.
CI needs to be fixed though of course.
...ilityCollector/Microsoft.PowerShell.CrossCompatibility/Collection/PowerShellDataCollector.cs
Show resolved
Hide resolved
...ilityCollector/Microsoft.PowerShell.CrossCompatibility/Query/Platform/OperatingSystemData.cs
Outdated
Show resolved
Hide resolved
Yeah it looks like this reflects a legitimate bug... I'll need to look into it |
@bergmeister I've got this working now, if you've got time to take a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks
And also suppressed only for parameters: | ||
|
||
```powershell | ||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCommands", "Import-Module/FullyQualifiedName")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
PR Summary
PR Checklist
.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
to the beginning of the title and remove the prefix when the PR is ready.