Skip to content

Instantly share code, notes, and snippets.

@tobiashm
Last active July 8, 2016 09:58
Show Gist options
  • Save tobiashm/c48d067838f4924259c9 to your computer and use it in GitHub Desktop.
Save tobiashm/c48d067838f4924259c9 to your computer and use it in GitHub Desktop.
Run Rubocop from Atom with the RVM
#!/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 $@
@tobiashm
Copy link
Author

tobiashm commented Jul 8, 2016

Save as e.g. ~/bin/rubocop and set the Command config for linter-rubocop to the full path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment