Most aspects of its behavior can be tweaked via various
Apart from reporting problems in your code, RuboCop can also automatically fix some of the problems for you.
You can support my work on RuboCop via Salt and Gratipay.
Rubocop alternatives and similar gems
Based on the "Code Analysis and Metrics" category.
Alternatively, view Rubocop alternatives based on common mentions on social networks and blogs.
9.5 6.4 L5 Rubocop VS Scientist:microscope: A Ruby library for carefully refactoring critical paths.
9.0 0.8 L5 Rubocop VS SimpleCovCode coverage for Ruby with a powerful configuration library and automatic merging of coverage across test suites
5.4 1.3 L3 Rubocop VS FlogFlog reports the most tortured code in an easy to read pain report. The higher the score, the more pain the code is in.
5.0 0.8 L5 Rubocop VS FlayFlay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored.
2.8 3.5 Rubocop VS bundler-leakKnown-leaky gems verification for bundler: `bundle leak` to check your app and find leaky gems in your Gemfile :gem::droplet:
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Rubocop or a related project?
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.
Please consider financially supporting its ongoing development.
RuboCop's installation is pretty standard:
$ gem install rubocop
If you'd rather install RuboCop using
bundler, add a line for it in your
Gemfile (but set the
require option to
false, as it is a standalone tool):
gem 'rubocop', require: false
RuboCop is stable between major versions, both in terms of API and cop configuration.
We aim the 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
gem 'rubocop', '~> 1.6', require: false
See versioning for further details.
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 officially supports the following Ruby implementations:
- MRI 2.4+
- JRuby 9.2+
See the compatibility 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:
[![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop-hq/rubocop) [![Ruby Style Guide](https://img.shields.io/badge/code_style-community-brightgreen.svg)](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
- Koichi Ito
- Maxim Krizhanovski
- Benjamin Quorning
- Marc-André Lafortune
See the team page for more details.
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](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! :-)
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.
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 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](CHANGELOG.md).
Copyright (c) 2012-2020 Bozhidar Batsov. See [LICENSE.txt](LICENSE.txt) for further details.
*Note that all licence references and agreements mentioned in the Rubocop README section above are relevant to that project's source code only.