---------- > Role models are important. > -- Officer Alex J. Murphy / RoboCop RuboCop is a Ruby static code analyzer (a.k.a. linter) and code formatter. Out of the box…
----------




> Role models are important.
> -- Officer Alex J. Murphy / RoboCop
RuboCop is a Ruby static code analyzer (a.k.a. linter) and code formatter. Out of the box it
will enforce many of the guidelines outlined in the community Ruby Style
Guide. Apart from reporting the problems discovered in your code,
RuboCop can also automatically fix many of them for you.
RuboCop is extremely flexible and most aspects of its behavior can be tweaked via various
configuration options.
----------




Working on RuboCop is often fun, but it also requires a great deal of time and energy.
Please consider [financially supporting its ongoing development](#funding).
Installation
RuboCop's installation is pretty standard:
sh
gem install rubocop
If you'd rather install RuboCop using bundler, add a line for it in yourGemfile (but set the require option to false, as it is a standalone tool):
rb
gem 'rubocop', require: false
RuboCop is stable between minor versions, both in terms of API and cop configuration.
We aim to ease the maintenance of RuboCop extensions and the upgrades between RuboCop
releases. All big changes are reserved for major releases.
To prevent an unwanted RuboCop update you might want to use a conservative version lock
in your Gemfile:
rb
gem 'rubocop', '~> 1.82', require: false
See our versioning policy for further details.
Quickstart
Just type rubocop in a Ruby project's folder and watch the magic happen.
sh
cd my/cool/ruby/project
rubocop
> [!TIP]
>
> You can also use this magic in your favorite editor with RuboCop's
> built-in LSP server.
Documentation
You can read a lot more about RuboCop in its official docs.
Compatibility
RuboCop officially supports the following runtime Ruby implementations:
- MRI 2.7+
- JRuby 9.4+
See the compatibility documentation for further details.
Readme Badge
If you use RuboCop in your project, you can include one of these badges in your readme to let people know that your code is written following the community Ruby Style Guide.


Here are the Markdown snippets for the two badges:
markdown
[](https://github.com/rubocop/rubocop)
[](https://rubystyle.guide)
Team
Here's a list of RuboCop's core developers:
- Bozhidar Batsov (author & head maintainer)
- Jonas Arvidsson
- Yuji Nakayama (retired)
- Evgeni Dzhelyov (retired)
- Ted Johansson
- Masataka Kuwabara (retired)
- Koichi Ito
- Maxim Krizhanovski
- Benjamin Quorning
- Marc-André Lafortune
- Daniel Vandersluis
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](CONTRIBUTING.md).
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
GitHub Sponsors,
Patreon,
PayPal,
Open Collective
and Tidelift
.
> [!NOTE]
>
> If doing a sponsorship in the form of donation is problematic for your company
> from an accounting standpoint, we'd recommend the use of Tidelift, where you
> can get a support-like subscription instead.
Open Collective for Individuals
Support us with a monthly donation and help us continue our activities. [Become a backer]
Open Collective for Organizations
Become a sponsor and get your logo on our README on GitHub with a link to your site. [Become a sponsor]
<a href="
…
Members
-
rubocop ★ PINNED
A Ruby static code analyzer and formatter, based on the community Ruby style guide.
Ruby ★ 13k 1d agoExplain → -
ruby-style-guide ★ PINNED
A community-driven Ruby coding style guide
★ 17k 17d agoExplain → -
rubocop-performance ★ PINNED
An extension of RuboCop focused on code performance checks.
Ruby ★ 739 16d agoExplain → -
rubocop-rails ★ PINNED
A RuboCop extension focused on enforcing Rails best practices and coding conventions.
Ruby ★ 875 7d agoExplain → -
rubocop-rspec ★ PINNED
Code style checking for RSpec files.
Ruby ★ 856 2d agoExplain → -
rubocop-minitest ★ PINNED
Code style checking for Minitest files.
Ruby ★ 160 10d agoExplain → -
rails-style-guide
A community-driven Ruby on Rails style guide
★ 6.5k 13d agoExplain → -
rspec-style-guide
Best practices for writing your specs!
★ 977 7mo agoExplain → -
guard-rubocop
Guard plugin for RuboCop
Ruby ★ 262 2y agoExplain → -
rubocop-ast
RuboCop's AST extensions and NodePattern functionality
Ruby ★ 146 1d agoExplain → -
rubocop-emacs
An Emacs interface for RuboCop
Emacs Lisp ★ 129 1y agoExplain → -
rubocop-rake
A RuboCop plugin for Rake
Ruby ★ 116 6mo agoExplain → -
rubocop-factory_bot
Code style checking for factory_bot files.
Ruby ★ 88 3d agoExplain → -
rubocop-md
RuboCop for Markdown code snippets
Ruby ★ 86 17d agoExplain → -
vscode-rubocop
The official VS Code extension for the RuboCop linter and code formatter.
TypeScript ★ 74 10d agoExplain → -
minitest-style-guide
Best practices for writing your tests
★ 73 7mo agoExplain → -
rubocop-capybara
Code style checking for Capybara files.
Ruby ★ 61 3d agoExplain → -
rubocop-jp
A place for RuboCop discussions in Japanese
★ 56 8y agoExplain → -
rubocop-thread_safety ⑂
An extension of RuboCop focused on thread-safety checks.
Ruby ★ 52 18d agoExplain → -
rubocop-extension-generator
A generator of RuboCop's custom cops gem.
Ruby ★ 52 9mo agoExplain → -
rubocop-i18n
RuboCop rules for detecting and autocorrecting undecorated strings for i18n (gettext and rails-i18n)
Ruby ★ 45 2mo agoExplain → -
rubocop-rspec_rails
Code style checking for Rails-related RSpec files.
Ruby ★ 41 3d agoExplain → -
rubocop-rubycw
Wrap ruby -cw by RuboCop
Ruby ★ 38 6mo agoExplain → -
rubocop-sequel
Code style checking for Sequel
Ruby ★ 31 3mo agoExplain → -
blog.rubystyle.guide
A companion blog to the community Ruby, Rails and RSpec guides
HTML ★ 7 1y agoExplain → -
packaging-style-guide
Best practices for writing downstream compatible code!
★ 6 4y agoExplain → -
docs.rubocop.org
RuboCop's documentation site
Handlebars ★ 5 1mo agoExplain → -
rubocop.org
RuboCop's web site
HTML ★ 4 4mo agoExplain → -
circleci-ruby-snapshot-image ▣
Builds a Ruby nightly image and publishes it to Docker Hub
Ruby ★ 3 3y agoExplain → -
capybara-style-guide
A community-driven Capybara coding style guide
Ruby ★ 2 7mo agoExplain → -
.github
No description.
★ 2 6y agoExplain →
No repos match these filters.