Code Monkey home page Code Monkey logo

rubocop-ci's Introduction

Rubocop for CI

Runs the following tools on your CI:

  • rubocop
  • brakeman
  • scss-lint
  • coffeelint
  • slim-lint
  • standard

Usage

Run bundle exec rake rubocop before committing. Do not use the plain rubocop binary, since that will not use the central configuration file from this repo.

You can also use bundle exec rake rubocop:auto_correct to fix most of the issues automatically. Please double check the results before committing!

If your project needs relaxed settings, you can generate a .rubocop_todo.yml file using bundle exec rake rubocop AUTOGEN=1.

Alternatively, there is a rubocop:diff Rake task that runs Rubocop only on the changes in your branch. This helps if you want to keep Rubocop up-to-date but don't want to change your whole code-base every time there is an update and also don't want to mask global settings in a .rubocop_todo.yml.

If you do not want to run scss-lint on your project (yet), you can create a .skip_scss_lint file in your project root.

To create brakeman exceptions, run bundle exec brakeman -I and follow the instructions.

Installation

Add this to the development/test group in your Gemfile:

gem 'rubocop-ci', git: 'https://github.com/ad2games/rubocop-ci'

If your project is not a Rails app, add the following to your Rakefile:

require 'rubocop-ci'

Run bundle exec rake rubocop before/after your tests on your CI.

Changes

If you work at ad2games, please open a pull request if you want to change the rubocop config. Merge it only if it has been approved by the team.

If you want to use this gem for your own company/project, feel free to fork!

rubocop-ci's People

Contributors

dziemba avatar tsujigiri avatar guigs avatar hwartig avatar hugh-is-this-guy avatar avakarev avatar rkushnir avatar ndreynolds avatar

Stargazers

Jeremi Taylor avatar 刘兴起 avatar  avatar Nick Urban avatar

Watchers

 avatar  avatar James Cloos avatar Mouaz Heron avatar Dustin Mierig avatar  avatar

rubocop-ci's Issues

Update standard

So far we couldn't update standardjs to v14, because it couldn't find babel-eslint.
Here is a hint as to why that might be.
Let's think about how to make it work with rubocop-ci.

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.