Skip to content
Code style checking for GitHub Ruby repositories
Ruby
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config Bump rubocop to 0.82.0 Apr 24, 2020
guides Prevent render inline: in views Mar 24, 2017
lib/rubocop/cop use correct method name May 20, 2020
test use correct method name May 20, 2020
.gitignore Bump .gitignore Dec 19, 2017
.rubocop.yml Fix for RuboCop Sep 13, 2018
.travis.yml Update rubies configured for CI Apr 22, 2020
Gemfile Fix for RuboCop Sep 13, 2018
LICENSE Add LICENSE Dec 10, 2016
README.md Branch configs for incompatible changes Sep 16, 2019
Rakefile Fix for RuboCop Sep 13, 2018
STYLEGUIDE.md Change bad/good to avoid/prefer Mar 5, 2018
rubocop-github.gemspec Bump version to v0.15.0 Apr 24, 2020

README.md

RuboCop GitHub Build Status

This repository provides recommended RuboCop configuration and additional Cops for use on GitHub open source and internal Ruby projects.

Usage

Rubocop 0.68 removed performance cops and 0.72 removed Rails cops. However, upgrading rubocop-github without modification will almost definitely create very many new offenses. The current version of this gem exposes the "legacy" configuration under config/default.yml and config/rails.yml which should be used if and only if the version of rubocop is locked to < 0.68 in your project (which it should be unless you bundle update rubocop). It also exposes an "edge" configuration under config/default_edge.yml and config/rails_edge.yml so that the changes can be tested without introducing breaking changes.

Legacy usage

Gemfile

gem "rubocop", "< 0.68"
gem "rubocop-github"

.rubocop.yml

inherit_gem:
  rubocop-github:
    - config/default.yml
    - config/rails.yml

Edge usage

Gemfile

gem "rubocop-github"
gem "rubocop-performance", require: false
gem "rubocop-rails", require: false

.rubocop.yml

inherit_gem:
  rubocop-github:
    - config/default_edge.yml
    - config/rails_edge.yml

Testing

bundle install bundle exec rake test

The Cops

All cops are located under lib/rubocop/cop/github, and contain examples/documentation.

You can’t perform that action at this time.