RuboCop is used for running static code analysis on your Ruby code.
You can combine the tips about listing files on the Git page with RuboCop.
git diff-tree --no-commit-id --name-only -r HEAD --diff-filter AMT | xargs bundle exec rubocop
git diff --name-only --diff-filter AMT | xargs bundle exec rubocop
git diff --name-only master --diff-filter AMT | xargs bundle exec rubocop