Skip to content

Instantly share code, notes, and snippets.

Avatar
🐢
I just wanted the turtle as a badge

Thomas Payet tpayet

🐢
I just wanted the turtle as a badge
View GitHub Profile
@tpayet
tpayet / pre-commit
Last active Jul 25, 2017
Rubocop pre-commit hook
View pre-commit
#!/usr/bin/env ruby
# Copy/pasta from https://gist.github.com/andrewpage/b281314934b9c15b5073 without the custome str methods
# Grab a list of staged changed files
changed_files = `git diff --name-only HEAD`.split("\n")
should_fail, broken_files = false, []
changed_files.each do |file|