From 9c7caa141f837bf00b1df4ce99095099e0dbbb74 Mon Sep 17 00:00:00 2001 From: Paul Andrei Badarau Date: Tue, 12 Jun 2018 11:30:13 +0300 Subject: [PATCH] Add short description for overcommit --- CONTRIBUTING.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e9ef0318..271e372b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -81,6 +81,19 @@ vagrant exec bundle exec rubocop You can read through current enabled rules in `.rubocop.yml` file. Explanations of the defined [rules](http://rubydoc.info/github/bbatsov/rubocop/master/frames) can be found in modules [Cop::Lint](http://rubydoc.info/github/bbatsov/rubocop/master/Rubocop/Cop/Lint) and [Cop::Style](http://rubydoc.info/github/bbatsov/rubocop/master/Rubocop/Cop/Style) and [Cop:Rails](https://rubocop.readthedocs.io/en/latest/cops_rails/). Additionally you can read through the [ruby style-guide](https://github.com/bbatsov/ruby-style-guide) to better understand core principles. +### Git Hooks +We use [overcommit](https://github.com/brigade/overcommit) to automate Rubocop in pre-commit git hooks. You can activate it locally with: + +```shell +# Install overcommit gem +vagrant exec gem install overcommit + +# Activate overcommit +vagrant exec overcommit install +``` + +You can read through the current enabled hooks in the `.overcommit.yml` file. + ### Test Suite We are using [rspec](http://rspec.info/)+[capybara](http://teamcapybara.github.io/capybara/)+[factory girl](https://github.com/thoughtbot/factory_girl) as a test suite. You can run it locally