Title: UseProcessBlockForPipelineCommand returns a warning when pipeline behavior is explicitly disabled · Issue #1725 · PowerShell/PSScriptAnalyzer · GitHub
Open Graph Title: UseProcessBlockForPipelineCommand returns a warning when pipeline behavior is explicitly disabled · Issue #1725 · PowerShell/PSScriptAnalyzer
X Title: UseProcessBlockForPipelineCommand returns a warning when pipeline behavior is explicitly disabled · Issue #1725 · PowerShell/PSScriptAnalyzer
Description: I've noticed that UseProcessBlockForPipelineCommand rule produces warning notifications when pipeline behavior (ValueFromPipeline, ValueFromPipelineByPropertyName) is explicitly disabled. Steps to reproduce Function Get-Number { [CmdletB...
Open Graph Description: I've noticed that UseProcessBlockForPipelineCommand rule produces warning notifications when pipeline behavior (ValueFromPipeline, ValueFromPipelineByPropertyName) is explicitly disabled. Steps to ...
X Description: I've noticed that UseProcessBlockForPipelineCommand rule produces warning notifications when pipeline behavior (ValueFromPipeline, ValueFromPipelineByPropertyName) is explicitly disabled. Steps...
Opengraph URL: https://github.com/PowerShell/PSScriptAnalyzer/issues/1725
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"UseProcessBlockForPipelineCommand returns a warning when pipeline behavior is explicitly disabled","articleBody":"I've noticed that `UseProcessBlockForPipelineCommand` rule produces warning notifications when pipeline behavior (`ValueFromPipeline`, `ValueFromPipelineByPropertyName`) is explicitly disabled.\r\n\r\nSteps to reproduce\r\n------------------\r\n\r\n```PowerShell\r\nFunction Get-Number\r\n{\r\n [CmdletBinding()]\r\n [OutputType([int])]\r\n Param(\r\n [Parameter(ValueFromPipeline=$false)]\r\n [int]\r\n $Number\r\n )\r\n\r\n $Number\r\n}\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\n\r\nThe rule should not report any findings\r\n\r\nActual behavior\r\n---------------\r\n\r\n```none\r\nRuleName Severity ScriptName Line Message\r\n-------- -------- ---------- ---- -------\r\nPSUseProcessBlockForPipelineCommand Warning Test-PSSA. 8 Command accepts pipeline input but has not defined a\r\n ps1 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\nName Value\r\n---- -----\r\nPSVersion 7.1.3\r\nPSEdition Core\r\nGitCommitId 7.1.3\r\nOS Microsoft Windows 10.0.19042\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> (Get-Module -ListAvailable PSScriptAnalyzer).Version | ForEach-Object { $_.ToString() }\r\n1.19.1\r\n1.20.0\r\n```\r\n","author":{"url":"https://github.com/Glober777","@type":"Person","name":"Glober777"},"datePublished":"2021-10-06T10:00:18Z","url":"https://github.com/PowerShell/PSScriptAnalyzer/issues/1725"}
| 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:9d11f8b7-0891-293c-027a-72dcc730e880 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C8AA:37EB8F:14A36C4:1D21430:6AFCE784 |
| html-safe-nonce | 24062e6a37fcbd8bf88bae473694ed808dbec2b9d82763dbe3e6737d66c06312 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOEFBOjM3RUI4RjoxNEEzNkM0OjFEMjE0MzA6NkFGQ0U3ODQiLCJ2aXNpdG9yX2lkIjoiMzQxNjM3NDk2MjIyNTQ3MzQxMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 78694cb9c237962143168c89e53a8672460ad06f4664502322fbe5e684f0fd77 |
| hovercard-subject-tag | issue:1017950851 |
| 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/1725/issue_layout |
| twitter:image | https://opengraph.githubassets.com/50fae1d243034cc2bc288b9ba6f752e399795888077475bc793460a1b8c1e48b/PowerShell/PSScriptAnalyzer/issues/1725 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/50fae1d243034cc2bc288b9ba6f752e399795888077475bc793460a1b8c1e48b/PowerShell/PSScriptAnalyzer/issues/1725 |
| og:image:alt | I've noticed that UseProcessBlockForPipelineCommand rule produces warning notifications when pipeline behavior (ValueFromPipeline, ValueFromPipelineByPropertyName) is explicitly disabled. Steps to ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Glober777 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 99aede4c5f55ec5cf06666a8c9e03ebf9f85f7231223e7f1c38c16e5504835b3 |
| 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 | ecfd63ca125ec74b42f74eeb158b3fa081c8c497 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width