This repository was archived by the owner on Sep 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Ruby: rubocop
LCD 47 edited this page Jun 12, 2016
·
23 revisions
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: Recai Oktaş roktas@bil.omu.edu.tr
Rubocop is a style checker for Ruby. See the project's page for details.
- Most issues returned by rubocop are warnings, so for best results your
g:syntastic_quiet_messagesshould not filter out warnings. - Only rubocop versions 0.12.0 and later are supported.
- Running rubocop under development versions of
rubyis not supported, sorry. - Mixing different versions of
rubyis not supported either. If therubocopchecker is not enabled automatically by syntastic, try runningrubocop --versionfrom the shell. If it complains about parser expecting a different version ofrubythan 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, sincerubysyntax did change between versions. The solution is to run a system such asrbenvorrvm, that allows you to run multiple versions ofrubywithout conflicts.
$ rbenv version
2.1.3 (set by /usr/local/var/rbenv/version)
$ rubocop --version
warning: parser/current is loading parser/ruby21, which recognizes
warning: 2.1.2-compliant syntax, but you are running 2.1.3.
0.26.1
$ rbenv shell 2.1.2
$ rubocop --version
0.26.1- Alternatively, if you absolutely must do it the wrong way, you can also
install this wrapper script and point
g:syntastic_ruby_rubocop_execto it. However, doing that voids your guarantee. Don't bother reporting any problems if you do it.