Rubocop automatically lints all open files, then reports errors and warnings in Nova's Issues sidebar and the editor gutter:
Rubocop requires some additional tools to be installed on your Mac:
- Node.js 8.2.0 and NPM 5.2.0 or newer
- Rubocop
Running the following command should globally install Rubocop for most use cases:
gem install rubocop rubocop-rails rubocop-rspec rubocop-md
- We now let you choose whether to prepend your rubocop with
bundle exec
. If you do not it will userubocop
from your default/global gemset.
- RVM users can now prepend their rubocop command with
rvm .ruby-version do
to surmount configuration issues with rvm. It will automatically use the.ruby-version
file in your project root if you enable this option.
If you have a .rubocop.yml with inherit_gem
and use rvm
you will need to make sure your gems are
all available in the default gemset with rvm. The easiest way to do this is to avoid using app specific
gemsets. Otherwise try:
cd $APP_DIRECTORY
rvm gemset use default
bundle install