Recently, I had a chance to contribute to a nice ruby gem called Checker. As the name suggests, It’s an utility for checking source files.
What’s cool about it is that it’ll check files you’re committing via git for errors or unwanted phrases, and will halt the commit if the check fails. No more typos & syntax errors in your repository!
It currently supports:
- ruby syntax
- haml & sass
- checking for binding.pry occurences
- yaml parsing
So it’s perfect kit for day-to-day Rails development.
Installing is dead-simple via rubygems:
gem install checker
And using is even simpler. Just say
checker to process staged git files:
It’s convinient to add
checker to .git/hooks/pre-commit . That way every single commit will be processed before saving.
For some modules to work you may need to install additional executables. See the gem README for more info. I hope you find it useful!