I'm no longer accepting the things I cannot change... I'm changing the things I cannot accept.
-- Angela Davis
RbHint is a Ruby static code analyzer (a.k.a. linter
) and code formatter. Out of the box it
will encourage many of the guidelines outlined in the community Ruby Style
Guide. Apart from reporting the problems discovered in your code,
RbHint can also automatically fix many of them you.
RbHint is extremely flexible and most aspects of its behavior can be tweaked via various configuration options.
RbHint's installation is pretty standard:
$ gem install rbhint
If you'd rather install RbHint using bundler
, add a line for it in your Gemfile
(but set the require
option to false
, as it is a standalone tool):
gem 'rbhint', require: false
RbHint'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 RbHint update you
might want to use a conservative version lock in your Gemfile
:
gem 'rbhint', '~> 0.85.1.rc1', require: false
Just type rbhint
in a Ruby project's folder and watch the magic happen.
$ cd my/cool/ruby/project
$ rbhint
RbHint is a feature-for-feature compatible adaptation of RuboCop, with a kindler, gentler approach to encouragingg change. You can read more about how to use RbHint by reading RuboCop's official docs.
RbHint supports the following Ruby implementations:
- MRI 2.4+
- JRuby 9.2+
Currently, rbhint
is maintained by Zee Spencer.
Other contributions would be appreciated.
Here's a list of RbHint's historic developers:
- Bozhidar Batsov (author & head maintainer)
- Jonas Arvidsson
- Yuji Nakayama (retired)
- Evgeni Dzhelyov (retired)
- Ted Johansson
- Masataka Kuwabara
- Koichi Ito
- Maxim Krizhanovski
Here's a list of all the people who have contributed to the development of RbHint.
I'm extremely grateful to each and every one of them!
If you'd like to contribute to RbHint, please take the time to go through our short contribution guidelines.
Converting more of the Ruby Style Guide into RbHint norms is our top priority right now. Writing a new norm is a great way to dive into RbHint!
Of course, bug reports and suggestions for improvements are always welcome. GitHub pull requests are even better! :-)
RbHint's changelog is available here.
Copyright (c) 2012-2020 Bozhidar Batsov, 2020 Zee Spencer. See LICENSE.txt for further details.