Role models are important.
-- Officer Alex J. Murphy / RoboCop
RubbyCop is a Ruby static code analyzer. Out of the box it will enforce many of the guidelines outlined in the community Ruby Style Guide.
Most aspects of its behavior can be tweaked via various configuration options.
Apart from reporting problems in your code, RubbyCop can also automatically fix some of the problems for you.
Installation
RubbyCop's installation is pretty standard:
$ gem install rubbycop
If you'd rather install RubbyCop using bundler
, don't require it in your Gemfile
:
gem 'rubbycop', require: false
RubbyCop'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 RubbyCop update you
might want to use a conservative version locking in your Gemfile
:
gem 'rubbycop', '~> 0.49.0', require: false
Quickstart
Just type rubbycop
in a Ruby project's folder and watch the magic happen.
$ cd my/cool/ruby/project
$ rubbycop
Official manual
You can read a ton more about RubbyCop in its official manual.
Compatibility
RubbyCop supports the following Ruby implementations:
- MRI 2.0
- MRI 2.1
- MRI 2.2
- MRI 2.3
- MRI 2.4
- JRuby 9.0+
- Rubinius 2.0+
Team
Here's a list of RubbyCop's core developers:
Logo
RubbyCop'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 RubbyCop.
I'm extremely grateful to each and every one of them!
If you'd like to contribute to RubbyCop, please take the time to go through our short contribution guidelines.
Converting more of the Ruby Style Guide into RubbyCop cops is our top priority right now. Writing a new cop is a great way to dive into RubbyCop!
Of course, bug reports and suggestions for improvements are always welcome. GitHub pull requests are even better! :-)
Funding
While RubbyCop 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 RubbyCop we'd appreciate it if you suggest to your company to become a RubbyCop sponsor.
You can support the development of RubbyCop via Salt, Gratipay 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
RubbyCop's changelog is available here.
Copyright
Copyright (c) 2012-2017 Bozhidar Batsov. See LICENSE.txt for further details.