Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Ruby: rubylint

LCD 47 edited this page Jun 12, 2016 · 9 revisions

This file is no longer maintained

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.

Note

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.

Clone this wiki locally