autopkg / aysiu-recipes

Recipes for autopkg
GNU General Public License v2.0
5 stars 9 forks source link

Pre-commit configuration for AutoPkg recipes #25

Closed homebysix closed 5 years ago

homebysix commented 5 years ago

For your consideration, this pull request adds a pre-commit configuration that will automatically test your recipes for common issues and misconfigurations before each commit.

To start using, you'll need pre-commit installed on the Mac you develop recipes on. You'll also need to cd to your local recipe repository and run pre-commit install once to activate the hooks. After that, just use git commit as you usually would.

I've made sure that all your recipes pass the pre-commit tests in their current form:

$ pre-commit run --all-files 
Check AutoPkg Recipes....................................................Passed
Forbid AutoPkg Overrides.................................................Passed
Forbid AutoPkg Trust Info................................................Passed

If you accept this change, I'd love to hear your feedback on my AutoPkg-specific pre-commit hooks. I'm still actively developing them and tweaking features, so please let me know if you have any questions or find problems.

Thanks for considering!

aysiu commented 5 years ago

I'm honestly not sure what this does, and it looks as if I'll have to read up a bit more on it, but the change certainly seems innocuous (you're not modifying recipes to download malware or modifying the recipes at all), so I'm going to go ahead and approve it, and then read up a bit more on pre-commit later.

homebysix commented 5 years ago

If you've got 10 minutes, I'll tell you about it. :-)

https://www.youtube.com/watch?v=1UCyGC6DVOU

aysiu commented 5 years ago

I'll have ten minutes at some point, so I'll definitely put that on my to-watch list!