Skip to content

Instantly share code, notes, and snippets.

View drmartell's full-sized avatar

drmartell

  • Nayya, Inc.
  • Portland, OR
  • 02:57 (UTC -07:00)
  • LinkedIn in/drmartell
View GitHub Profile
@drmartell
drmartell / pre-commit
Last active June 30, 2021 21:16
run RuboCop on staged files with pre-commit hook
#!/usr/bin/env ruby
# frozen-string-literal: true
# SEE: https://gist.github.com/mpeteuil/6147292
require 'rubocop'
VALID_FILE_CODES = %w[A M].freeze
# staged files have both a valid code and a `git status --porcelain` line that doesn't start with a space

Keybase proof

I hereby claim:

  • I am drmartell on github.
  • I am caseymartell (https://keybase.io/caseymartell) on keybase.
  • I have a public key ASDzlx96oFWAQvVxdsKYrycHP_sy1XL3UpGdTFw3Jl1YCwo

To claim this, I am signing this object: