Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/janestreet/ps7compatibilityrules
PSScriptAnalyzer rules to help migrating PowerShell 5.1 scripts to PowerShell 7
https://github.com/janestreet/ps7compatibilityrules
powershell psscriptanalyzer pwsh
Last synced: about 2 months ago
JSON representation
PSScriptAnalyzer rules to help migrating PowerShell 5.1 scripts to PowerShell 7
- Host: GitHub
- URL: https://github.com/janestreet/ps7compatibilityrules
- Owner: janestreet
- Created: 2024-10-23T14:02:24.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-23T15:31:41.000Z (3 months ago)
- Last Synced: 2024-12-14T21:11:41.948Z (about 2 months ago)
- Topics: powershell, psscriptanalyzer, pwsh
- Language: PowerShell
- Homepage:
- Size: 7.81 KB
- Stars: 3
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A collection of [PSScriptAnalyzer](https://github.com/PowerShell/PSScriptAnalyzer) rules to highlight
potential PowerShell 7 compatibility issues when migrating from PowerShell 5.1# Usage
```powershell
git clone https://github.com/janestreet/PS7CompatibilityRules.git
Invoke-ScriptAnalyzer -Path '' -Recurse -CustomRulePath .\PS7CompatibilityRules
```
# Included Rules| Rule | Description |
| -----| ----------- |
| AvoidDeprecatedCommands | Flag commands that are listed on Microsoft's website as incompatible with PS7 |
| AvoidDeprecatedTypes | Flag references to deprecated types that are incompatible with PS7 |
| AvoidGetSetAccessControl | Flag GetAccessControl() or SetAccessControl() calls |
| CommandRecommendations | Recommendations for specific commands that have different behavior in PS7 |
| NoHtmlParsing | Flag code that relies on HTML parsing done in web cmdlets |
| SelectObjectMustSpecifyProperty | Select-Object ExcludeProperty is effective only when the command also includes a Property parameter |