Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
39435594
Commit
39435594
authored
Nov 11, 2020
by
Rémy Coutable
Committed by
Evan Read
Nov 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve the Lefthook installation instructions
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
d4817475
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
doc/development/contributing/style_guides.md
doc/development/contributing/style_guides.md
+14
-3
lefthook.yml
lefthook.yml
+1
-1
No files found.
doc/development/contributing/style_guides.md
View file @
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
...
...
lefthook.yml
View file @
39435594
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment