Giter Site home page Giter Site logo

rubocop-github's Introduction

RuboCop GitHub CI

This repository provides recommended RuboCop configuration and additional Cops for use on GitHub open source and internal Ruby projects, and is the home of GitHub's Ruby Style Guide.

Usage

Add rubocop-github to your Gemfile, along with its dependencies:

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

Inherit all of the stylistic rules and cops through an inheritance declaration in your .rubocop.yml:

# .rubocop.yml
inherit_gem:
  rubocop-github:
  - config/default.yml # generic Ruby rules and cops
  - config/rails.yml # Rails-specific rules and cops

Alternatively, only require the additional custom cops in your .rubocop.yml without inheriting/enabling the other stylistic rules:

# .rubocop.yml
require:
  - rubocop-github  # generic Ruby cops only
  - rubocop-github-rails # Rails-specific cops only

๐Ÿ’ญ Looking for config/accessibility.yml and the GitHub/Accessibility configs? They have been moved to a new gem.

For more granular control over which of RuboCop's rules are enabled for your project, both from this gem and your own configs, consider using the DisabledByDefault: true option under AllCops in your project's .rubocop.yml file. This will disable all cops by default, and you can then explicitly enable the ones you want by setting Enabled: true. See the RuboCop docs for more information.

Legacy usage

If you are using a rubocop version < 1.0.0, you can use rubocop-github version 0.16.2 (see the README from that version for more details).

Testing

bundle install
bundle exec rake test

The Cops

All cops are located under lib/rubocop/cop/github.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.