Skip to content

Instantly share code, notes, and snippets.

@edulan
Last active May 1, 2019 09:21
Show Gist options
  • Save edulan/0f0e7510543f8f72c32e to your computer and use it in GitHub Desktop.
Save edulan/0f0e7510543f8f72c32e to your computer and use it in GitHub Desktop.
Git pre-commit hook for checking Mocha .only declarations
#!/usr/bin/env bash
PATTERN="describe\.only\|it\.only"
MESSAGE="You cannot commit this SHITE"
if git diff --name-only --cached | xargs grep -Hn --color=always $PATTERN; then
echo ""
echo $MESSAGE
exit 1
else
exit 0
fi
@andresgutgon
Copy link

You cannot commit this SHITE

eh, tranquil :trollface:

@edulan
Copy link
Author

edulan commented Feb 2, 2016

Developer friendly :trollface:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment