/git-js-debug-traces-hook

Just a small git pre-commit hook that's meant to catch any traces of debugging you may have forgotten in JavaScript files that are intended to be exposed.

Primary LanguageShellMIT LicenseMIT

What is git-js-debug-traces-hook?

Just a small git pre-commit hook that is aimed towards catching traces of debugging code you may have forgotten, specifically in JavaScript/CoffeeScript files that are intended to be exposed.

How to install

~ cp pre-commit.sh /path/to/your/project/.git/hooks/pre-commit
~ chmod +x /path/to/your/project/.git/hooks/pre-commit

What to expect

Assuming you forgot to remove a console.log(this); line here and a debugger; breakpoint there, you commit your changes and then the pre-commit hook throws this wonderful tantrum at you:

Throw a tantrum

When you actually want to commit debugging code

~ git commit --no-verify