Skip to content

Instantly share code, notes, and snippets.

View tpayet's full-sized 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 July 25, 2017 13:23
Rubocop pre-commit hook
#!/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|