Skip to content

Instantly share code, notes, and snippets.

@m4scosta
Created March 16, 2018 18:23
Show Gist options
  • Save m4scosta/07d8843f714954289f3eaed3c9b54fff to your computer and use it in GitHub Desktop.
Save m4scosta/07d8843f714954289f3eaed3c9b54fff to your computer and use it in GitHub Desktop.
Run rubocop for only modified and added files
git status --porcelain | grep -P '^\s?[MA]\s+.*.rb' | cut -c4- | xargs rubocop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment