Skip to content

Instantly share code, notes, and snippets.

@raine
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raine/109647975af87ce21f44 to your computer and use it in GitHub Desktop.
Save raine/109647975af87ce21f44 to your computer and use it in GitHub Desktop.
.git/hooks/pre-push
#!/bin/bash
set -e
gulp jshint --target=production
dir='./app'
bad_words='ddescribe|iit'
test_file_pattern='*test.js'
test_files=`find $dir -name $test_file_pattern`
bad_words_line_count=`echo $test_files | xargs grep -E $bad_words | wc -l`
if [ $bad_words_line_count -gt 0 ]; then
ag $bad_words $dir
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment