Title: Add ability to determine when script uses language features and/or cmdlets not available in the specified minimum version of PowerShell · Issue #127 · PowerShell/PSScriptAnalyzer · GitHub
Open Graph Title: Add ability to determine when script uses language features and/or cmdlets not available in the specified minimum version of PowerShell · Issue #127 · PowerShell/PSScriptAnalyzer
X Title: Add ability to determine when script uses language features and/or cmdlets not available in the specified minimum version of PowerShell · Issue #127 · PowerShell/PSScriptAnalyzer
Description: This is increasingly becoming an issue as PowerShell gets new language features and cmdlets. And cmdlets get new parameters, etc. I could have a #requires -version 3.0 in my script but I'm developing on PowerShell 5.0. It is real easy to...
Open Graph Description: This is increasingly becoming an issue as PowerShell gets new language features and cmdlets. And cmdlets get new parameters, etc. I could have a #requires -version 3.0 in my script but I'm developi...
X Description: This is increasingly becoming an issue as PowerShell gets new language features and cmdlets. And cmdlets get new parameters, etc. I could have a #requires -version 3.0 in my script but I'm deve...
Mail addresses
notifications@github.com
notifications@github.com
Opengraph URL: https://github.com/PowerShell/PSScriptAnalyzer/issues/127
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add ability to determine when script uses language features and/or cmdlets not available in the specified minimum version of PowerShell","articleBody":"This is increasingly becoming an issue as PowerShell gets new language features and cmdlets. And cmdlets get new parameters, etc. I could have a #requires -version 3.0 in my script but I'm developing on PowerShell 5.0. It is real easy to slip up and use a lang feature (\"using namespace System.Diagnostics\") or a cmdlet (New-TemporaryFile) or a new cmdlet parameter (PassThru added to Enable-JobTrigger in v4). It would be great if ScriptAnalyzer saw a #requires -Version X.0 and warned (or errored) when I used a feature not available on X.0. Likewise, I would like to have a parameter to ScriptAnalyzer where I could tell it the minimum version I want to target (perhaps I have several scripts written at different times that have varying levels of #requires -Version).\n\nFor bonus points, if someone specified neither the command line parameter (MinimumPowerShellVersion) or had any #requires or min version in their PSD1 file, it would be nice if ScriptAnalyzer told me that - \"Scripts require at least version 4 due use of -PassThru parameter on Enable-JobTrigger and use of Get-FileHash cmdlet).\n\nWhere things get a bit more tricky is setting a minimum Windows OS version. But the need is there since I have a whole bunch of cmdlets available to me on Windows 8.1 that I know are not available on Windows 7. \n","author":{"url":"https://github.com/rkeithhill","@type":"Person","name":"rkeithhill"},"datePublished":"2015-05-08T19:07:44Z","url":"https://github.com/PowerShell/PSScriptAnalyzer/issues/127"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ae19c6f3-4d30-79b5-3616-dcb2ce6000a8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D838:3D0013:26597A5:3593FD4:6AFD4D22 |
| html-safe-nonce | c5e7ea72ae8976f097c175cefcb3cb8865c3eb298ecbb8e397645bebbe9edd3e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODM4OjNEMDAxMzoyNjU5N0E1OjM1OTNGRDQ6NkFGRDREMjIiLCJ2aXNpdG9yX2lkIjoiMjYyNTY1NTU0ODcwMzIzMTI2NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 732f62de943e32e85ec40c2ca3e0b555b7ded02e85f42429eab6fc727666cb3b |
| hovercard-subject-tag | issue:74462401 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PSScriptAnalyzer/127/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6ecc294460701d976e3c7d3f445b76d8ff0c75f0d373fbde7521a41c440f7f8f/PowerShell/PSScriptAnalyzer/issues/127 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6ecc294460701d976e3c7d3f445b76d8ff0c75f0d373fbde7521a41c440f7f8f/PowerShell/PSScriptAnalyzer/issues/127 |
| og:image:alt | This is increasingly becoming an issue as PowerShell gets new language features and cmdlets. And cmdlets get new parameters, etc. I could have a #requires -version 3.0 in my script but I'm developi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rkeithhill |
| hostname | github.com |
| expected-hostname | github.com |
| None | 66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PSScriptAnalyzer git https://github.com/PowerShell/PSScriptAnalyzer.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 33149177 |
| octolytics-dimension-repository_nwo | PowerShell/PSScriptAnalyzer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 33149177 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PSScriptAnalyzer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b6f01f7cb9f35f8c09949773241a3d49dd04b340 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width