April 18, 2012
I wanted a subversion pre-commit hook script that did the following:
- Ensures all *.pp files in the transaction can be validated by the parser
- Ensures all *.pp files pass a puppet-lint check
- Ensures all *.erb files pass a syntax check
I poked around a bit, but it looks like most of the existing pre-commit hook scripts were a bit out of date (wouldn’t work on puppet >= 2.7). Also, I didn’t see a script that also ran puppet-lint. That led me to write my own pre-commit hook. You can find my script on my github page.