-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlefthook.yml
More file actions
36 lines (32 loc) · 824 Bytes
/
lefthook.yml
File metadata and controls
36 lines (32 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
# For more configuration options, see: https://lefthook.dev/configuration/
pre-commit:
parallel: true
jobs:
- name: gofumpt
glob: "*.go"
run: gofumpt -l -w .
- name: golangci-lint
glob: "*.go"
run: golangci-lint run --new-from-rev=HEAD --fix
- name: github-actions-lint
glob: ".github/workflows/*.{yml,yaml}"
run: actionlint
pre-push:
parallel: true
jobs:
- name: test
run: go test ./...
commit-msg:
jobs:
- name: commitlint
run: commitlint lint {1}
fail_text: |
❌ Invalid commit message format!
Please follow Conventional Commits:
feat(scope): add feature
fix(scope): fix bug
Example:
feat(auth): add JWT support
See https://www.conventionalcommits.org/en/v1.0.0/
...