Created
April 20, 2020 16:59
-
-
Save alexbrinkman/376d77455bace27d488c8551b1c8346c to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env ruby | |
if `grep -rls --include "*.rb" --include "*.js" "debugger" .` != "" | |
puts "A debugger statement was found, remove before committing." | |
exit(1) | |
end | |
if `grep -rls --include "*.rb" "binding.pry" .` != "" | |
puts "A pry statement was found, remove before committing." | |
exit(1) | |
end | |
if `grep -rls --include "*.rb" "<<<<<<<" .` != "" | |
puts "A git merge statement was found (<<<<<<<), remove before committing." | |
exit(1) | |
end | |
if `grep -rls --include "*.rb" ">>>>>>>" .` != "" | |
puts "A git merge statement was found (>>>>>>>), remove before committing." | |
exit(1) | |
end | |
if `grep -rls --include "*_spec.rb" "save_page" .` != "" | |
puts "A save_page statement was found, remove before committing." | |
exit(1) | |
end | |
if `grep -rls --include "*_spec.rb" "save_and_open_page" .` != "" | |
puts "A save_and_open_page statement was found, remove before committing." | |
exit(1) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment