PowerShell / PSScriptAnalyzer

Download ScriptAnalyzer from PowerShellGallery
https://www.powershellgallery.com/packages/PSScriptAnalyzer/
MIT License
1.87k stars 379 forks source link

psusecompatibleSyntax goes a bit too far. #2041

Open jhoneill opened 3 weeks ago

jhoneill commented 3 weeks ago

Not sure if something has changed but I've noticed this recently, and it the hadn't registered before

Summary of the new feature

I'm seeing this
The constructor syntax '[type]::new()' is not available by default in PowerShell versions 3,4 I got the same with class We're trying to get people to move on from Windows PowerShell 5, but that has been around for 8 yeas or so and it might be time to review the pre-PowerShell 5 features people are told to avoid

Proposed technical implementation details (optional)

Drop checks for PowerShell 3 compatibility.

What is the latest version of PSScriptAnalyzer at the point of writing 1.22.0