Title: UseCmdletCorrectly : This rule only fires for the cmdlets / functions loaded in the default runspace · Issue #883 · PowerShell/PSScriptAnalyzer · GitHub
Open Graph Title: UseCmdletCorrectly : This rule only fires for the cmdlets / functions loaded in the default runspace · Issue #883 · PowerShell/PSScriptAnalyzer
X Title: UseCmdletCorrectly : This rule only fires for the cmdlets / functions loaded in the default runspace · Issue #883 · PowerShell/PSScriptAnalyzer
Description: $sb={ Function Get-MyCommand { param( [Parameter(Mandatory=$true,Position=1)] $ParamMandatory, [Parameter(Position=2)] $B, [Parameter(Position=3)] $C ) "Test" } Get-MyCommand Write-verbose } Invoke-ScriptAnalyzer -ScriptDefinition "$sb" ...
Open Graph Description: $sb={ Function Get-MyCommand { param( [Parameter(Mandatory=$true,Position=1)] $ParamMandatory, [Parameter(Position=2)] $B, [Parameter(Position=3)] $C ) "Test" } Get-MyCommand Write-verbose } Invoke...
X Description: $sb={ Function Get-MyCommand { param( [Parameter(Mandatory=$true,Position=1)] $ParamMandatory, [Parameter(Position=2)] $B, [Parameter(Position=3)] $C ) "Test" } Get-MyCommand Write-verbos...
Opengraph URL: https://github.com/PowerShell/PSScriptAnalyzer/issues/883
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"UseCmdletCorrectly : This rule only fires for the cmdlets / functions loaded in the default runspace","articleBody":"```powershell \r\n $sb={\r\n Function Get-MyCommand {\r\n param( \r\n [Parameter(Mandatory=$true,Position=1)] \r\n $ParamMandatory,\r\n \r\n [Parameter(Position=2)]\r\n $B,\r\n \r\n [Parameter(Position=3)]\r\n $C\r\n )\r\n \"Test\"\r\n }\r\n Get-MyCommand\r\n Write-verbose\r\n }\r\n Invoke-ScriptAnalyzer -ScriptDefinition \"$sb\"\r\n ```\r\nThis rule does not fire because it only calls the [GetCommandInfo()](https://github.com/PowerShell/PSScriptAnalyzer/blob/development/Rules/UseCmdletCorrectly.cs#L91) method.\r\n\r\nThe [test file](https://github.com/PowerShell/PSScriptAnalyzer/blob/development/Tests/Rules/UseCmdletCorrectly.ps1) does not contain this use case.\r\n","author":{"url":"https://github.com/LaurentDardenne","@type":"Person","name":"LaurentDardenne"},"datePublished":"2018-02-10T14:48:05Z","url":"https://github.com/PowerShell/PSScriptAnalyzer/issues/883"}
| 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:ae4e38d4-3431-699a-349a-5ee4bd846e48 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 985E:19088D:5F441:7D083:6AFCFA7E |
| html-safe-nonce | 4643b5633494f1fbfc4b922b555aa728036566b0cc5b89cd5c977a3023a79374 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODVFOjE5MDg4RDo1RjQ0MTo3RDA4Mzo2QUZDRkE3RSIsInZpc2l0b3JfaWQiOiI4NDUzNjQ0NDY2NzY1MjMyNzY2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 867539f731ef747971747c5affeec364d5d7f95d2d02a65a4761fcabbc664a31 |
| hovercard-subject-tag | issue:296106103 |
| 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/883/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c5f5acafb5af24d67c298b14327426ed913d44ccc705101f80e60ffa2b6d288f/PowerShell/PSScriptAnalyzer/issues/883 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c5f5acafb5af24d67c298b14327426ed913d44ccc705101f80e60ffa2b6d288f/PowerShell/PSScriptAnalyzer/issues/883 |
| og:image:alt | $sb={ Function Get-MyCommand { param( [Parameter(Mandatory=$true,Position=1)] $ParamMandatory, [Parameter(Position=2)] $B, [Parameter(Position=3)] $C ) "Test" } Get-MyCommand Write-verbose } Invoke... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | LaurentDardenne |
| hostname | github.com |
| expected-hostname | github.com |
| None | cfabad6ee26d2b84c7afef4ae0cc71b8b692fb9d66f9f15997652ef991bfd3f4 |
| 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 | 35f85b78676038389558a41adf8d76e474592ede |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width