Remove Conditional Compilation and Runtime Checks for v3 or v4 by liamjpeters · Pull Request #2150 · PowerShell/PSScriptAnalyzer
PR Summary
The minimum PS version the module can be loaded in is 5.1 (since e849068).
All of the conditional compilation checks around PSV3 and PSV4 can be removed/simplified.
Similarly the runtime checks for anything less than major version 5 can be simplified.
There are probably still some functions acting as compat shims to bridge functionality missing in 3 or 4 which could also be replaced.
PR Checklist
- PR has a meaningful title
- Use the present tense and imperative mood when describing your changes
- Summarized changes
- Change is not breaking
- Make sure all
.cs,.ps1and.psm1files have the correct copyright header - Make sure you've added a new test if existing tests do not effectively test the code changed and/or updated documentation
- This PR is ready to merge and is not Work in Progress.
- If the PR is work in progress, please add the prefix
WIP:to the beginning of the title and remove the prefix when the PR is ready.
- If the PR is work in progress, please add the prefix