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

Ruby: rubocop

LCD 47 edited this page May 14, 2015 · 23 revisions

Maintainer: Recai Oktaş [email protected]

Rubocop is a style checker for Ruby. See the project's page for details.

Notes

  1. Most issues returned by rubocop are warnings, so for best results your g:syntastic_quiet_messages should not filter out warnings.
  2. Only rubocop versions 0.12.0 and later are supported.
  3. Running rubocop under development versions of ruby is not supported, sorry.
  4. If the rubocop checker is not enabled automatically by Syntastic, try running rubocop --version from the shell. If you get warnings about parser expecting a different version of ruby than you are running, you can either install this wrapper script and point g:syntastic_ruby_rubocop_exec to it, or use rbenv to switch to a different version of ruby:
$ 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
Clone this wiki locally