Commit 39435594 authored by Rémy Coutable's avatar Rémy Coutable Committed by Evan Read

Improve the Lefthook installation instructions

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent d4817475
...@@ -23,13 +23,24 @@ for static analysis offenses before pushing your changes. ...@@ -23,13 +23,24 @@ for static analysis offenses before pushing your changes.
To install `lefthook`, run the following in your GitLab source directory: To install `lefthook`, run the following in your GitLab source directory:
```shell ```shell
# Make sure to uninstall Overcommit first # 1. Make sure to uninstall Overcommit first
overcommit --uninstall overcommit --uninstall
# If using rbenv, at this point you may need to do: rbenv rehash # If using rbenv, at this point you may need to do: rbenv rehash
# Install lefthook # 2. Install lefthook...
gem install lefthook && lefthook install -f
## With Homebrew (macOS)
brew install Arkweid/lefthook/lefthook
## Or with Go
go get github.com/Arkweid/lefthook
## Or with Rubygems
gem install lefthook
# 3. Install the Git hooks
lefthook install -f
``` ```
Before you push your changes, Lefthook then automatically run Danger checks, and other checks Before you push your changes, Lefthook then automatically run Danger checks, and other checks
......
...@@ -21,7 +21,7 @@ pre-push: ...@@ -21,7 +21,7 @@ pre-push:
scss-lint: scss-lint:
tags: stylesheet css style tags: stylesheet css style
files: git diff --name-only $(git merge-base origin/master HEAD)..HEAD files: git diff --name-only $(git merge-base origin/master HEAD)..HEAD
glob: "*.scss.css" glob: "*.scss{,.css}"
exclude: "app/assets/stylesheets/pages/emojis.scss" exclude: "app/assets/stylesheets/pages/emojis.scss"
run: bundle exec scss-lint --config .scss-lint.yml {files} run: bundle exec scss-lint --config .scss-lint.yml {files}
rubocop: rubocop:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment