Closed BethanyZhou closed 1 year ago
New-AzObject is a client side cmdlet to create an object. So both new-Azobject and Get-* will not change any thing in service side, so adding shouldprocess with even confirmImpact set to low does not make sense here. I think we should fix the analyzer instead.
Hi @dolauli , thanks for your opinions. But if we don't set confirmImpact for them, powershell will regard them as high impact in fact, which may cause harm.
Close as add task to improve static analyzer for these two kinds of cmdlets.
Our static analyzer always reports New-Az*Object has signature issue and developer has to suppress them by configuring our tools.
To save engineer effort, please exempt New-Az*Object from "should implement ShouldProcess" issue.
For Get-* cmdlet, its ConfirmImpact is empty. PowerShell will use "High" as its ConfirmImpact by default if not specify. And our static analyzer reports "the cmdlet should implement ShouldProcess" warning.