forked from customerio/customerio-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlefthook.yml
18 lines (15 loc) · 816 Bytes
/
lefthook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Configuration for lefthook tool to manage git hooks
# https://github.com/evilmartians/lefthook
# Commands to run before committing code.
pre-commit:
commands:
lint:
# Format code and then `git add` modified files from formatter.
run: make format && git add {staged_files}
# Commands to run before pushing code
pre-push:
commands:
lint:
# Run linter giving you errors to fix.
# By using `|| echo "..."`, we do not block you from pushing code. Running lint in a git hooks is to warn you about lint errors early, but not block you from pushing code with errors if you decide to push.
run: make lint || echo -e "\n\n ⚠️ Linting contains errors that will prevent you from merging a pull request. Fix errors above if you are planning on making a pull request."