Last active
July 8, 2016 09:58
-
-
Save tobiashm/c48d067838f4924259c9 to your computer and use it in GitHub Desktop.
Run Rubocop from Atom with the RVM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function upsearch () { | |
test / == "$PWD" && return || test -e "$1" && cat "$PWD/$1" && return || cd .. && upsearch "$1" | |
} | |
ruby_version=$(upsearch ".ruby-version") | |
$HOME/.rvm/bin/rvm ${ruby_version:-default} do bundle exec rubocop $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Save as e.g.
~/bin/rubocop
and set the Command config for linter-rubocop to the full path.