Commit f91b099c authored by Evan Read's avatar Evan Read

Merge branch 'improve-lefthook-instructions' into 'master'

Improve lefthook instructions

See merge request gitlab-org/gitlab!47218
parents 60e145b1 39435594
......@@ -23,13 +23,24 @@ for static analysis offenses before pushing your changes.
To install `lefthook`, run the following in your GitLab source directory:
```shell
# Make sure to uninstall Overcommit first
# 1. Make sure to uninstall Overcommit first
overcommit --uninstall
# If using rbenv, at this point you may need to do: rbenv rehash
# Install lefthook
gem install lefthook && lefthook install -f
# 2. Install lefthook...
## 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
......
......@@ -21,7 +21,7 @@ pre-push:
scss-lint:
tags: stylesheet css style
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"
run: bundle exec scss-lint --config .scss-lint.yml {files}
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