The project is in a healthy, maintained state
Used in Vox Pupuli gems to configure RuboCop in a unified and centralised way
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
 Dependencies

Runtime

~> 13.0, >= 13.0.6
~> 1.54.0
~> 0.6.0
~> 2.22.0
 Project Readme

Vox Pupuli RuboCop Gem

License Test Release RubyGem Version RubyGem Downloads

This is one of the Vox Pupuli meta gems. It provides a convenient way to configure RuboCop. RuboCop is the de facto standard Ruby Linter and Formatter. voxpupuli-rubocop depends on the correct RuboCop version

  • dependencies that we want to use in our CI pipelines. There is also a rubocop.yml that configures RuboCop. and preconfigured rake tasks.

The goal of this gem is to provide a central configuration for RuboCop that's used in all Vox Pupuli gems.

Usage

In your Gemfile, add the following:

gem 'voxpupuli-rubocop', '~> 1.1'

In your Rakefile, include our Rake task:

require 'voxpupuli/rubocop/rake'

Now you can list your rake tasks and should see three new ones:

bundle exec rake -T
rake rubocop                  # Run RuboCop
rake rubocop:autocorrect      # Autocorrect RuboCop offenses (only when it's safe)
rake rubocop:autocorrect_all  # Autocorrect RuboCop offenses (safe and unsafe)

To use our default config, create a .rubocop.yml:

---
inherit_gem:
  voxpupuli-rubocop: rubocop.yml

You maybe see a bunch of violations with the new configuration. A common path forward is to accept them but prevent future/more violations. You can generate a "RuboCop ToDo file", which is basically an allow-list of all current violations:

bundle exec rubocop --regenerate-todo