Git Product home page Git Product logo

namely_ruby_whiff's Introduction

๐Ÿ‘ƒ Namely Ruby Whiff

Namely Ruby Whiff is a Ruby gem that contains common Rubocop configurations to use in your Ruby projects. New tools will be added over time, the next being ruby critic.

Installation

To install Namely Ruby Whiff, simply add it to your Gemfile:

gem 'namely_ruby_whiff', git: 'https://github.com/namely/namely_ruby_whiff.git', branch: 'master', require: false

And then run bundle install.

Next, replace your project's .rubocop.yml file with the following, followed by any rules or configurations you want to add or override:

inherit_gem:
  namely_ruby_whiff: config/rubocop-rails.yml

For non-Rails projects, use the following file path instead: config/rubocop-vanilla.yml.

Usage

Once you've installed the gem, you can run Rubocop with the following command to make sure it's finding the configs from the gem:

bundle exec rubocop

The gem also includes rubocop-changes a tool to apply Rubocop to only the files that have changes in your branch.

bundle exec rubocop-changes

Caveats

When adding an additional file to a rule for exclusion, the excluded files from the base config also have to be added to the local config. For example:

# in the base config from this gem
Lint/RescueException:
  Exclude:
    - 'app/lib/koala/evaluator.rb'


# in your local project's config

## this will no longer exclude the koala file from base
Lint/RescueException:
  Exclude:
    - 'app/my_weird_file.rb'

## this will work as intended
Lint/RescueException:
  Exclude:
    - 'app/lib/koala/evaluator.rb'
    - 'app/my_weird_file.rb'

namely_ruby_whiff's People

Contributors

jmh avatar

Watchers

Peter D'Angelo avatar  avatar Ido Rekem avatar

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.