forked from troian/pre-commit-golang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-hooks.yaml
48 lines (48 loc) · 1.36 KB
/
.pre-commit-hooks.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
48
- id: go-fmt
name: 'go fmt'
entry: run-go-fmt.sh
files: '\.go$'
language: 'script'
description: "Runs `gofmt`, requires golang"
- id: go-imports
name: 'go imports'
entry: run-goimports.sh
files: '\.go$'
language: 'script'
description: "Runs `goimports`, requires golang"
- id: go-vet
name: 'go vet'
entry: run-go-vet.sh
files: '\.go$'
language: 'script'
description: "Runs `go vet`, requires golang"
- id: go-lint
name: 'go lint'
entry: run-go-lint.sh
files: '\.go$'
language: 'script'
description: "Runs `golint`, requires https://github.com/golang/lint"
- id: go-metalinter
name: 'go metalinter'
entry: run-go-metalinter.sh
files: '\.go$'
language: 'script'
description: "Runs `gometalinter`, requires https://github.com/alecthomas/gometalinter"
- id: go-build
name: 'go build'
description: "Makes sure Go code can build"
entry: run-go-build.sh
language: 'script'
files: '\.go$'
- id: go-build-plugin
name: 'go build plugin'
description: "Makes sure Go code can build package as plugin"
entry: run-go-build-plugin.sh
language: 'script'
files: '\.go$'
- id: staticcheck
name: 'staticcheck'
entry: run-staticcheck.sh
files: '\.go$'
language: 'script'
description: "Runs `staticcheck`, requires https://staticcheck.io/"