-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
47 lines (44 loc) · 1.4 KB
/
.pre-commit-config.yaml
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
37
38
39
40
41
42
43
44
45
46
47
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/Bahjat/pre-commit-golang
rev: v1.0.3
hooks:
- id: go-fmt-import
- id: gofumpt # requires github.com/mvdan/gofumpt
- id: go-err-check # requires github.com/kisielk/errcheck
- id: go-static-check # install https://staticcheck.io/docs/
- id: golangci-lint # requires github.com/golangci/golangci-lint
args: [--config=.github/linters/.golangci.yml] # optional
- id: go-ruleguard # requires https://github.com/quasilyte/go-ruleguard
args: [rules/rules.go] # required
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-vet
- id: go-imports
- id: go-cyclo
args: [-over=15]
- id: validate-toml
- id: no-go-testing
- id: go-critic
- id: go-unit-tests
- id: go-build
- id: go-mod-tidy
- id: go-fmt
- id: go-unit-tests
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.18.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ['@commitlint/config-conventional']
- repo: https://github.com/crate-ci/typos
rev: v1.27.0
hooks:
- id: typos