Skip to content

Instantly share code, notes, and snippets.

@shirlston
Last active November 2, 2015 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shirlston/2faa4944ccee9f60f8f1 to your computer and use it in GitHub Desktop.
Save shirlston/2faa4944ccee9f60f8f1 to your computer and use it in GitHub Desktop.
Rubo: Execute rubocop on ruby files that match a regex
#!/bin/bash
# rubo
# rubo(cop)
# Execute rubocop on ruby files that match a regex
# syntax:
# rubo <file regex>
git diff --name-only `git merge-base origin/master HEAD` | grep $1 | grep rb | xargs rubocop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment