/rbhint

A kindler, gentler Ruby static code analyzer and formatter.

Primary LanguageRubyMIT LicenseMIT


Gem Version CircleCI Status Actions Status Coverage Status Code Climate Inline docs SemVer

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.

Installation

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

Quickstart

Just type rbhint in a Ruby project's folder and watch the magic happen.

$ cd my/cool/ruby/project
$ rbhint

Documentation

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.

Compatibility

RbHint supports the following Ruby implementations:

  • MRI 2.4+
  • JRuby 9.2+

Team

Currently, rbhint is maintained by Zee Spencer. Other contributions would be appreciated.

Here's a list of RbHint's historic developers:

Contributors

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! :-)

Changelog

RbHint's changelog is available here.

Copyright

Copyright (c) 2012-2020 Bozhidar Batsov, 2020 Zee Spencer. See LICENSE.txt for further details.