A Ruby static code analyzer and formatter, based on the community Ruby style guide.
Ruby Other
koic and bbatsov Restore tests for Ruby 2.1 or higher
Follow up of https://github.com/rubocop-hq/rubocop/pull/5990/files#r200832453
and https://github.com/rubocop-hq/rubocop/pull/5990/files#r200832468

This PR restores tests that keyword arguments without defaults were
introduced in Ruby 2.1.
Latest commit dbe86ee Jul 18, 2018
Permalink
Failed to load latest commit information.
.circleci Document "hidden" ENV variables in Circle config Jun 27, 2018
.github Reduce checkboxes from the PULL_REQUEST_TEMPLATE Dec 7, 2017
assets Change organization URL to rubocop-hq May 31, 2018
bin Add `bin/setup` script to bin dir Jun 17, 2018
config Add reference to doc of `Performance/RegexpMatch` Jul 7, 2018
exe Move bindir from bin direcotry to exe directory May 22, 2018
lib Fix a false positive for `Layout/IndentationWidth` (#6103) Jul 18, 2018
logo [Fix #578] Add a logo Sep 4, 2014
manual [Fix #6084] Allow leading underscores for method names (#6095) Jul 18, 2018
relnotes Cut 0.58.1 Jul 10, 2018
spec Restore tests for Ruby 2.1 or higher Jul 18, 2018
tasks Add new `Rails/BulkChangeTable` cop (#5881) Jun 3, 2018
.editorconfig Add an `.editorconfig` file (#3748) Dec 1, 2016
.gitattributes Change merge driver for CHANGELOG.md to resolve conflict problem Oct 11, 2016
.gitignore Ignore .ruby-version file in git management Jan 17, 2018
.rspec Specify `--require spec_helper` in .rspec Mar 1, 2017
.rubocop.yml [Fix #5973] Add Style/IpAddresses cop Jun 19, 2018
.rubocop_todo.yml Update rubocop_todo file Jun 6, 2018
.travis.rb Minor organization of TravisCI script Jun 4, 2018
.travis.yml Drop support for MRI 2.1 Jun 18, 2018
.yardopts Hide void return of methods in YARD documentation Jun 10, 2013
CHANGELOG.md Fix a false positive for `Layout/IndentationWidth` (#6103) Jul 18, 2018
CONTRIBUTING.md Change the URL of "About pull requests" [ci skip] Jun 8, 2018
Gemfile Drop support for MRI 2.1 Jun 18, 2018
LICENSE.txt Bump license year for 2018 Jan 11, 2018
README.md Extend the README a bit Jul 10, 2018
Rakefile Remove `rake repl` task Jun 15, 2018
appveyor.yml CI against Ruby 2.4 and 2.5 on Appveyor Apr 11, 2018
mkdocs.yml Enable the admonition markdown extension Jun 17, 2018
readthedocs.yml Tell Read the Docs to build downloadable docs (#5563) Feb 16, 2018
rubocop.gemspec [Fix #6092] Don't use the broken parser 2.5.1.1 version Jul 10, 2018

README.md

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

Patreon Liberapay OpenCollective OpenCollective

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.

Gitter

Please consider supporting financially its ongoing development.

Installation

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 locking in your Gemfile:

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

Quickstart

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

$ cd my/cool/ruby/project
$ rubocop

Official manual

You can read a ton more about RuboCop in its official manual.

Compatibility

RuboCop supports the following Ruby implementations:

  • MRI 2.2+
  • JRuby 9.0+

The Rails cops support the following versions:

  • Rails 4.0+

Team

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

Logo

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.

Contributors

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! :-)

Funding

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, Liberapay, 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]

Changelog

RuboCop's changelog is available here.

Copyright

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