Skip to content

Instantly share code, notes, and snippets.

View lenlorijn's full-sized avatar

Len Lorijn lenlorijn

View GitHub Profile
#!/bin/bash
#
# Based on http://nrocco.github.io/2012/04/19/git-pre-commit-hook-for-PHP.html post
# and https://gist.github.com/jpetitcolas/ce00feaf19d46bfd5691
#
# Do not forget to: chmod +x .git/hooks/pre-commit
BAD_PHP_WORDS='var_dump|die|exit|ini_set|extract|__halt_compiler|eval(|print_r'
BAD_JS_WORDS='console.log'
BAD_TWIG_WORDS='{{ dump(.*) }}'