autopkg / andrewvalentine-recipes

6 stars 19 forks source link

Pre-commit configuration for AutoPkg recipes #28

Closed homebysix closed 1 year ago

homebysix commented 4 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
Check Plists.............................................................Passed
Check for added large files..............................................Passed
Check for byte-order marker..............................................Passed
Check for case conflicts.................................................Passed
Check for merge conflicts................................................Passed
Mixed line ending........................................................Passed
Check that executables have shebangs.....................................Passed
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................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!