0.0
The project is in a healthy, maintained state
Ruby code linting for Cobalt Ruby repositories
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.10

Runtime

 Project Readme

Cobalt RuboCop

Gem Version GitHub License Gem Downloads Ruby Style Guide

Description

This repository provides recommended linting rules for Ruby repositories.

Contributing

If you wish to contribute, please check our guidelines in CONTRIBUTING.md

Who to ask for help

Ask the CODEOWNERS

Installation

Gemfile

Add

source 'https://rubygems.pkg.github.com/cobalthq' do
  group :development do
    gem 'cobalt-rubocop', require: false
  end
end

Remove

gem 'rubocop', require: false
gem 'rubocop-performance', require: false
gem 'rubocop-rails', require: false
gem 'rubocop-rspec', require: false

Specific versions installed for:

.rubocop.yml

Configuration Options:

inherit_gem:
  cobalt-rubocop:
    - "config/default.yml"
    - "config/rails.yml"
    - "config/rspec.yml"

Usage

bundle install
bundle exec rubocop

When installing rules on an older project it is possible to generate a todo list:

bundle exec rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 40000

The number of offences can be counted:

grep "Offense count" .rubocop_todo.yml | awk -F: '{sum+=$2} END {print sum}'