Skip to content
A Ruby static code analyzer and formatter, based on the community Ruby style guide.
Ruby Other
  1. Ruby 99.8%
  2. Other 0.2%
Branch: master
Clone or download
Latest commit ef25ea2 Oct 14, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci [Fix #6945] Drop support for Ruby 2.2 May 8, 2019
.github Cut 0.75.1 Oct 14, 2019
assets Change organization URL to rubocop-hq May 31, 2018
bin Use bundle in bin/console Jul 25, 2019
config [Fix #6964] Set default `IgnoreCopDirectives` to `true` for `Metrics/… Oct 14, 2019
exe [Fix #6939] Remove warn for rubocop-performance (#6944) Apr 17, 2019
lib Cut 0.75.1 Oct 14, 2019
logo [Fix #578] Add a logo Sep 4, 2014
manual Cut 0.75.1 Oct 14, 2019
relnotes Cut 0.75.1 Oct 14, 2019
spec [Fix #6964] Set default `IgnoreCopDirectives` to `true` for `Metrics/… Oct 14, 2019
tasks Make it possible to set `StyleGuideBaseURL` per department Aug 19, 2019
.editorconfig Add an `.editorconfig` file (#3748) Dec 1, 2016
.gitattributes Change merge driver for to resolve conflict problem Oct 11, 2016
.gitignore Add byebug_history to gitignore Apr 22, 2019
.rspec Specify `--require spec_helper` in .rspec Mar 1, 2017
.rubocop.yml Exclude .git from internal investigation Oct 8, 2019
.rubocop_todo.yml Show warning message if passed string to 'Enabled' key in .rubocop.yml Aug 19, 2019
.simplecov Generate code coverage report on all spec runs Sep 11, 2018
.yardopts Hide void return of methods in YARD documentation Jun 10, 2013 Cut 0.75.1 Oct 14, 2019 Add link to Development docs Apr 7, 2019
Gemfile Bump RuboCop Performance to 1.5.0 Oct 13, 2019
LICENSE.txt Update Copyright year to 2019 Jan 2, 2019 Cut 0.75.1 Oct 14, 2019
Rakefile Use Ruby 2.6 parser for `rake documentation_syntax_check` May 14, 2019
appveyor.yml CI against Ruby 2.6 on Appveyor Aug 1, 2019
mkdocs.yml Revert "Add Extensions Cops Documentation references in the official … Oct 5, 2019
readthedocs.yml Specify `stable` to build image on Read the Docs Feb 12, 2019
rubocop.gemspec Drop development dependency on Rack gem Jun 11, 2019

Gem Version CircleCI Status AppVeyor Status Coverage Status Code Climate Inline docs SemVer

Patreon OpenCollective OpenCollective Tidelift

RuboCop Logo

Role models are important.
-- Officer Alex J. Murphy / RoboCop

RuboCop is a Ruby static code analyzer and code formatter. Out of the box it will enforce many of the guidelines outlined in the community Ruby Style Guide.

RuboCop is extremely flexible and most aspects of its behavior can be tweaked via various configuration options.

Apart from reporting problems in your code, RuboCop can also automatically fix some of the problems for you.


Please consider financially supporting its ongoing development.


RuboCop's installation is pretty standard:

$ gem install rubocop

If you'd rather install RuboCop using bundler, don't require it in your Gemfile:

gem 'rubocop', require: false

RuboCop's development is moving at a very rapid pace and there are often backward-incompatible changes between minor releases (since we haven't reached version 1.0 yet). To prevent an unwanted RuboCop update you might want to use a conservative version lock in your Gemfile:

gem 'rubocop', '~> 0.75.1', require: false


Just type rubocop in a Ruby project's folder and watch the magic happen.

$ cd my/cool/ruby/project
$ rubocop


You can read a lot more about RuboCop in its official docs.


RuboCop supports the following Ruby implementations:

  • MRI 2.3+
  • JRuby 9.1+


Here's a list of RuboCop's core developers:


RuboCop's logo was created by Dimiter Petrov. You can find the logo in various formats here.

The logo is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.


Here's a list of all the people who have contributed to the development of RuboCop.

I'm extremely grateful to each and every one of them!

If you'd like to contribute to RuboCop, please take the time to go through our short contribution guidelines.

Converting more of the Ruby Style Guide into RuboCop cops is our top priority right now. Writing a new cop is a great way to dive into RuboCop!

Of course, bug reports and suggestions for improvements are always welcome. GitHub pull requests are even better! :-)


While RuboCop is free software and will always be, the project would benefit immensely from some funding. Raising a monthly budget of a couple of thousand dollars would make it possible to pay people to work on certain complex features, fund other development related stuff (e.g. hardware, conference trips) and so on. Raising a monthly budget of over $5000 would open the possibility of someone working full-time on the project which would speed up the pace of development significantly.

We welcome both individual and corporate sponsors! We also offer a wide array of funding channels to account for your preferences (although currently Open Collective is our preferred funding platform).

If you're working in a company that's making significant use of RuboCop we'd appreciate it if you suggest to your company to become a RuboCop sponsor.

You can support the development of RuboCop via Salt, Patreon, PayPal and Open Collective.

Open Collective Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Open Collective Sponsors

Become a sponsor and get your logo on our README on GitHub with a link to your site. [Become a sponsor]


RuboCop's changelog is available here.


Copyright (c) 2012-2019 Bozhidar Batsov. See LICENSE.txt for further details.

You can’t perform that action at this time.