This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
=begin | |
A hook to make sure that all staged .rb files are syntatically correct. | |
The hook tries to run `ruby -c file_path` for all those files and | |
prints outs the errors if any and halts the commit. | |
If you want to use this pre-commit, simply copy the code and create a | |
file called 'pre-commit' inside your .git/hooks directory. |