[Repost] PSUseProcessBlockForPipelineCommand does not recognize use of $input within an End block
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 48/100
調査の方向性
まず、提供されたスクリプト定義と PSUseProcessBlockForPipelineCommand ルールを使用して Invoke-ScriptAnalyzer で問題を再現します。End block 内で $input を介して参照されるパイプライン入力をルールがどのように処理するかを追跡します。完了の条件は、例で診断が生成されず、同時に実際に欠落している process blocks に対するルールの動作が維持されることです。
索引モデルが issue の本文から書いたものです。
説明
Repost: Hoping to get some clarification, since this was mechanically closed based on a factually incorrect response to #1912 .
Steps to reproduce
Invoke-ScriptAnalyzer -IncludeRule PSUseProcessBlockForPipelineCommand `
-ScriptDefinition 'Param([Parameter(ValueFromPipeline=$true)][psobject] $Item); End {$input |ConvertTo-Json}'
Expected behavior
(no output)
Actual behavior
RuleName Severity ScriptName Line Message
-------- -------- ---------- ---- -------
PSUseProcessBlockForPipelineCommand Warning 1 Command accepts pipeline input but has not defined a
process block.
Environment data
> $PSVersionTable
Name Value
---- -----
PSVersion 7.3.4
PSEdition Core
GitCommitId 7.3.4
OS Microsoft Windows 10.0.22621
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
> (Get-Module -ListAvailable PSScriptAnalyzer).Version | ForEach-Object { $_.ToString() }
1.21.0
- 主要言語
- C#
- スター
- 2.2k
- フォーク
- 415
- 平均マージ
- 13時間 1分
- マージ済み PR(30日)
- 2
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PowerShell/PSScriptAnalyzer のほかの issue
-
Up-for-Grabs
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
PowerShell/PSScriptAnalyzer#2213 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
PowerShell/PSScriptAnalyzer#2217 · コメント 1 件 ·
-
PSUseConsistentIndentation double-indents attribute bodies that open a scriptblock (`[Attr({ … })]`) オープン
難易度 3/5 1〜2日 初心者へのやさしさ 70/100
PowerShell/PSScriptAnalyzer#2216 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
PowerShell/PSScriptAnalyzer#2211 ·
-
`PSPlaceOpenBrace` and `PSPlaceCloseBrace` leave trailing whitespace when expanding one-line blocks オープン
難易度 3/5 1〜2日 初心者へのやさしさ 70/100
PowerShell/PSScriptAnalyzer#2210 ·
PowerShell/PSScriptAnalyzer の issue をすべて見る
似ている issue
-
:watch: Not Triaged dotnet-fsharp/svc
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
Client customer-reported needs-team-attention question Service Attention WebPubSub
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Azure/azure-sdk-for-net#63292 · コメント 3 件 · リアクション 1 件 ·
-
Issue-Enhancement Needs-Triage
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
PowerShell/PowerShell#28061 · リアクション 2 件 ·
-
dependencies needs-team-triage server-Azure.Mcp
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
aspnet-core/svc aspnetcore-signalr/subsvc doc-enhancement Pri2 SignalR
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
dotnet/AspNetCore.Docs#37729 ·