Title: PSUseProcessBlockForPipelineCommand does not recognize use of $input within an End block · Issue #1912 · PowerShell/PSScriptAnalyzer · GitHub
Open Graph Title: PSUseProcessBlockForPipelineCommand does not recognize use of $input within an End block · Issue #1912 · PowerShell/PSScriptAnalyzer
X Title: PSUseProcessBlockForPipelineCommand does not recognize use of $input within an End block · Issue #1912 · PowerShell/PSScriptAnalyzer
Description: Steps to reproduce Invoke-ScriptAnalyzer -IncludeRule PSUseProcessBlockForPipelineCommand ` -ScriptDefinition 'Param([Parameter(ValueFromPipeline=$true)][psobject] $Item); End {$input |ConvertTo-Json}' Expected behavior (no output) Actua...
Open Graph Description: Steps to reproduce Invoke-ScriptAnalyzer -IncludeRule PSUseProcessBlockForPipelineCommand ` -ScriptDefinition 'Param([Parameter(ValueFromPipeline=$true)][psobject] $Item); End {$input |ConvertTo-Js...
X Description: Steps to reproduce Invoke-ScriptAnalyzer -IncludeRule PSUseProcessBlockForPipelineCommand ` -ScriptDefinition 'Param([Parameter(ValueFromPipeline=$true)][psobject] $Item); End {$input |ConvertT...
Opengraph URL: https://github.com/PowerShell/PSScriptAnalyzer/issues/1912
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PSUseProcessBlockForPipelineCommand does not recognize use of $input within an End block","articleBody":"Steps to reproduce\r\n------------------\r\n\r\n```PowerShell\r\nInvoke-ScriptAnalyzer -IncludeRule PSUseProcessBlockForPipelineCommand `\r\n\t-ScriptDefinition 'Param([Parameter(ValueFromPipeline=$true)][psobject] $Item); End {$input |ConvertTo-Json}'\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\n\r\n_(no output)_\r\n\r\nActual behavior\r\n---------------\r\n\r\n```none\r\nRuleName Severity ScriptName Line Message\r\n-------- -------- ---------- ---- -------\r\nPSUseProcessBlockForPipelineCommand Warning 1 Command accepts pipeline input but has not defined a\r\n process block.\r\n```\r\n\r\nEnvironment data\r\n----------------\r\n\r\n\u003c!-- Provide the output of the following 2 commands -->\r\n\r\n```PowerShell\r\n> $PSVersionTable\r\n\r\nName Value\r\n---- -----\r\nPSVersion 7.3.4\r\nPSEdition Core\r\nGitCommitId 7.3.4\r\nOS Microsoft Windows 10.0.22621\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n\r\n\r\n> (Get-Module -ListAvailable PSScriptAnalyzer).Version | ForEach-Object { $_.ToString() }\r\n1.21.0\r\n```\r\n","author":{"url":"https://github.com/brianary","@type":"Person","name":"brianary"},"datePublished":"2023-05-07T02:10:17Z","url":"https://github.com/PowerShell/PSScriptAnalyzer/issues/1912"}
| 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:84927c91-4c5e-b511-9f55-86b9e69dce8e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AB78:D764E:B7D0C:F1057:6AFCFBD6 |
| html-safe-nonce | beb36793cd94b8ec8ab69e2e420b16bd4bcfc428016efec3d53cc30f0246394e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQjc4OkQ3NjRFOkI3RDBDOkYxMDU3OjZBRkNGQkQ2IiwidmlzaXRvcl9pZCI6IjM0NjYwOTg4NjgwNTgxMjczMTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2cecdaf6a2b09b78a47f23304aae58bc1acf255e132fbf03edd19a99042d2ce9 |
| hovercard-subject-tag | issue:1698853539 |
| 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/1912/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6b904bb8fb78a50a9e8868de382e61f9d63edcc04c91fddffaa000bf8e8683ba/PowerShell/PSScriptAnalyzer/issues/1912 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6b904bb8fb78a50a9e8868de382e61f9d63edcc04c91fddffaa000bf8e8683ba/PowerShell/PSScriptAnalyzer/issues/1912 |
| og:image:alt | Steps to reproduce Invoke-ScriptAnalyzer -IncludeRule PSUseProcessBlockForPipelineCommand ` -ScriptDefinition 'Param([Parameter(ValueFromPipeline=$true)][psobject] $Item); End {$input |ConvertTo-Js... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | brianary |
| 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