cookstyle
cookstyle copied to clipboard
Detect multiple uses of provides with the same name
What category of cop is this?:
Please try to select as few as possible.
- [ ] ChefDeprecations - A cop that alerts on a deprecation in the Chef Infra Client
- [ ] ChefCorrectness - A cop that alerts when incorrect coding behavior is being used
- [ ] ChefSharing - A cop that alerts to missing functionality necessary for sharing cookbooks with others
- [ ] ChefStyle - A cop that alerts to a style best practice
- [ ] ChefModernize - A cop that alerts when a cookbook can be simplified or modernized with new functionality
- [ ] ChefEffortless - A cop that alerts on code that must be resolved to move to the Effortless pattern
Describe the new cop:
There's no reason to use provides with the same name more than once and it doesn't do what you think it does. I suspect the last one wins, but it doesn't make sense regardless.
What it would trigger on:
provides :automatic_software_updates
provides :automatic_software_updates, platform: 'mac_os_x'