Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.1k
A Ruby static code analyzer and formatter, based on the community Ruby style guide.
License
rubocop/rubocop
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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 itwill enforce many of the guidelines outlined in the communityRuby StyleGuide. 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 variousconfiguration options.
Working on RuboCop is often fun, but it also requires a great deal of time and energy.
Please considerfinancially supporting its ongoing development.
RuboCop's installation is pretty standard:
gem install rubocop
If you'd rather install RuboCop usingbundler
, add a line for it in yourGemfile
(but set therequire
option tofalse
, as it is a standalone tool):
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 RuboCopreleases. All big changes are reserved for major releases.To prevent an unwanted RuboCop update you might want to use a conservative version lockin yourGemfile
:
gem'rubocop','~> 1.81',require:false
Seeour versioning policy for further details.
Just typerubocop
in a Ruby project's folder and watch the magic happen.
cd my/cool/ruby/projectrubocop
Tip
You can also use this magic in your favorite editor with RuboCop'sbuilt-in LSP server.
You can read a lot more about RuboCop in itsofficial docs.
RuboCop officially supports the following runtime Ruby implementations:
- MRI 2.7+
- JRuby 9.4+
It targets Ruby 2.0+ for code analysis.
See thecompatibility documentation for further details.
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:
[](https://github.com/rubocop/rubocop)[](https://rubystyle.guide)
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
See theteam page for more details.
RuboCop's logo was created byDimiter Petrov. You can find the logo in variousformatshere.
The logo is licensed under aCreative Commons Attribution-NonCommercial 4.0 International License.
Here's alist ofall 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 gothrough our shortcontribution guidelines.
Converting more of the Ruby Style Guide into RuboCop cops is our toppriority right now. Writing a new cop is a great way to dive into RuboCop!
Of course, bug reports and suggestions for improvements are alwayswelcome. 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 oncertain 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 projectwhich would speed up the pace of development significantly.
We welcome both individual and corporate sponsors! We also offer awide array of funding channels to account for your preferences(althoughcurrentlyOpen Collective is ourpreferred funding platform).
If you're working in a company that's making significant use of RuboCop we'dappreciate it if you suggest to your company to become a RuboCop sponsor.
You can support the development of RuboCop viaGitHub Sponsors,Patreon,PayPal,Open CollectiveandTidelift.
Note
If doing a sponsorship in the form of donation is problematic for your companyfrom an accounting standpoint, we'd recommend the use of Tidelift, where youcan get a support-like subscription instead.
Support us with a monthly donation and help us continue our activities. [Become a backer]
Become a sponsor and get your logo on our README on GitHub with a link to your site. [Become a sponsor]
RuboCop's release notes are availablehere.
Copyright (c) 2012-2025 Bozhidar Batsov. SeeLICENSE.txt forfurther details.
About
A Ruby static code analyzer and formatter, based on the community Ruby style guide.
Topics
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.