Hacker News new | past | comments | ask | show | jobs | submit login

Wouldn't it be a lot better choice to make this a post-receive hook on your Git server? E.g. run the tests before code gets accepted to master.

I often intentionally commit code that doesn't work (pass tests or even compile), but not to master branch. One of the big advantages of Git is that you can share code with your team mates even if that code doesn't work yet.




You could always set the script to only run the tests on certain branches on pre-commit. (i.e. if branch name is not master, exit 0)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: