Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

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

Open
cnorthe opened this issue Oct 25, 2018 · 4 comments
Open

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

cnorthe opened this issue Oct 25, 2018 · 4 comments
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.

Comments

@cnorthe
Copy link

cnorthe commented Oct 25, 2018

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

@stale
Copy link

stale bot commented Nov 24, 2018

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 stale bot added the stale The issue or pull request was marked as stale because there hasn't been activity from the community. label Nov 24, 2018
@johlju
Copy link
Contributor

johlju commented Dec 7, 2018

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

@stale stale bot removed the stale The issue or pull request was marked as stale because there hasn't been activity from the community. label Dec 7, 2018
@PlagueHO PlagueHO added enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. labels Dec 7, 2018
@PlagueHO
Copy link
Contributor

PlagueHO commented Dec 7, 2018

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

@johlju
Copy link
Contributor

johlju commented Dec 8, 2018

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

3 participants