DscResource.Tests icon indicating copy to clipboard operation
DscResource.Tests copied to clipboard

Add PSSA test for [CmdletBinding()] attribute on every Function.

Open cnorthe opened this issue 7 years ago • 4 comments

Details of the problem, bug, or enhancement

Avoid Redefining Reserved Parameters

Reserved Parameters such as Verbose, Debug, etc. are already added to the function at runtime so don't redefine them. Add the CmdletBinding attribute to include the reserved parameters in your function. Use the CmdletBinding Attribute on Every Function The CmdletBinding attribute adds the reserved parameters to your function which is always preferable.

https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#use-the-cmdletbinding-attribute-on-every-function

cnorthe avatar Oct 25 '18 15:10 cnorthe

This issue has been automatically marked as stale because it has not had activity from the community in the last 30 days. It will be closed if no further activity occurs within 10 days. If the issue is labelled with any of the work labels (e.g bug, enhancement, documentation, or tests) then the issue will not auto-close.

stale[bot] avatar Nov 24 '18 15:11 stale[bot]

I'm all for this. @PlagueHO can you please label this issue as enhancement so it is not labeled as stale?

johlju avatar Dec 07 '18 19:12 johlju

Missed this sorry! @johlju - done! We need to get your maintainer privileges back in here!

PlagueHO avatar Dec 07 '18 19:12 PlagueHO

@PlagueHO I will request that from Katie, as soon as I have cached up with the back log of mentions and reviews etc. :)

johlju avatar Dec 08 '18 09:12 johlju