Despite testcases, syntax errors still find their way into our commits.
- Maybe it was a change in that bash script that wasn't covered by tests. Too bad our deploys relied on it.
- Maybe it was just a textual change and we didn't think it was necessary to run the associated code before pushing this upstream. Too bad we missed that quote.
Whatever the reason, it's almost 2014 and we are still committing broken code. This needs to change because in the
- Best case: Travis or Jenkins prevent those errors from hitting production and it's frustrating to go back and revert/redo that stuff. A waste of your time and state of mind, as you already moved onto other things.
- Worst case: your error goes unnoticed and hits production.
Git offers commit hooks to prevent bad code from entering the repository, but you have to install them on a local per-project basis.
Chances are you have been too busy/lazy and never took the time/effort to whip up a commit hook that could deal with all your projects and programming languages.
That holds true for me, however I recently had some free time and decided to invest it in cooking up ochtra. One Commit Hook To Rule All.