Created
September 16, 2017 08:45
-
-
Save ravishrivastava/9ac994c7922a5c353346cd54d4ae67c1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Check commit for debugger, binding.pry or byebug | |
| if test "$(git diff --cached | grep '\+.*debugger')" | |
| then | |
| echo "Error: Attempt to commit a debugger line" | |
| echo "To skip this check, add the --no-verify option" | |
| exit 1 | |
| fi | |
| if test "$(git diff --cached | grep '\+.*binding\.pry')" | |
| then | |
| echo "Error: Attempt to commit a binding.pry line" | |
| echo "To skip this check, add the --no-verify option" | |
| exit 1 | |
| fi | |
| if test "$(git diff --cached | grep '\+.*byebug')" | |
| then | |
| echo "Error: Attempt to commit a byebug line" | |
| echo "To skip this check, add the --no-verify option" | |
| exit 1 | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment