-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Ruby: rubylint
This file exists only as a historic reference. Documentation for syntastic
checkers is now included in the manual, please see :help syntastic-checkers
in Vim.
Maintainer: Yorick Peterse [email protected]
Ruby-lint is a linter and static code analysis tool for Ruby. See the project's page for details.
Please note that the gem's name is ruby-lint
, while the syntastic
checker's name is rubylint
.
Mixing different versions of ruby
is not supported. If the rubylint
checker is not enabled automatically by syntastic, try running ruby-lint --version
from the shell. If it complains about parser expecting a
different version of ruby
than you are running, your configuration is not
directly supported by syntastic. While passing around the blame for this
does have a certain entertaining value, the problem is real, since ruby
syntax did change between versions. The solution is to run a system such as
rbenv
or rvm
, that allows you to run multiple versions of ruby
without conflicts:
$ rbenv version
2.1.3 (set by /usr/local/var/rbenv/version)
$ ruby-lint --version
warning: parser/current is loading parser/ruby21, which recognizes
warning: 2.1.2-compliant syntax, but you are running 2.1.3.
ruby-lint v2.0.4 on ruby 2.1.3 [i486-linux]
$ rbenv shell 2.1.2
$ ruby-lint --version
ruby-lint v2.0.4 on ruby 2.1.2 [i486-linux]
Alternatively, if you absolutely must do it the wrong way, you can also
install this wrapper script and point g:syntastic_ruby_rubylint_exec
to it. However, doing that voids your guarantee. Don't bother reporting any
problems if you do it.