PowerShell / PowerShell/PSScriptAnalyzer
psdscuseidenticalmandatoryparametersfordsc errors
オープン
まだ誰も着手していません。
Area - Rules
Issue - Bug
- 主要言語
- C#
- スター
- 2.2k
- フォーク
- 414
- 平均マージ
- 13時間 1分
- マージ済み PR(30日)
- 2
説明
GET/SET/Test have identical parameters.
param
(
[Parameter(Mandatory=$true)]
[System.String]
$DistinguishedName,
[Parameter(Mandatory=$true)]
[Microsoft.Management.Infrastructure.CimInstance[]]
$AccessControlList,
[Parameter(Mandatory=$false)]
[bool]
$Force = $false
)
I get this error when the rule runs.
Invoke-ScriptAnalyzer : Object reference not set to an instance of an object.
At line:1 char:1
- Invoke-ScriptAnalyzer .\AccessControlDsc -Recurse -ExcludeRule 'PSUse ...
-
+ CategoryInfo : InvalidOperation: (<filepath>:String) [Invoke-ScriptAnalyzer], NullReferenceException + FullyQualifiedErrorId : RULE_ERROR,Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands.InvokeScriptAnalyzerCommand
If I exclude this rule then I get no errors.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、示されている GET/SET/Test パラメーターを使用して、AccessControlDsc パス上で Invoke-ScriptAnalyzer とコマンドで指定されている PSUse... ルールを使い、エラーを再現します。ルールが同一の必須パラメーターをどのように処理するかを追跡します。分析が NullReferenceException なしで完了し、代わりに意図した結果を報告すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- powershell
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100