forked from shutter-network/pre-commit-go-hooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-hooks.yaml
41 lines (41 loc) · 1.1 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
- id: gofumpt
name: gofumpt
description: Run gofumpt
entry: gofumpt -w
types: [go]
language: golang
pass_filenames: True
additional_dependencies: ["mvdan.cc/[email protected]"]
- id: golines-gofumpt
name: golines-gofumpt
description: Run golines with gofumpt as base formatter
entry: golines -w --base-formatter gofumpt
args: ["-m120"]
types: [go]
language: golang
pass_filenames: True
additional_dependencies:
["mvdan.cc/[email protected]", "github.com/segmentio/[email protected]"]
- id: gci
name: gci
description: Control golang package import order and make it always deterministic.
entry: gci write
types: [go]
language: golang
pass_filenames: True
additional_dependencies: ["github.com/daixiang0/[email protected]"]
- id: go-mod-tidy
name: Run go mod tidy
entry: ./go-mod-tidy
files: '\.go$|go.mod$|go.sum$'
language: script
args: ["."]
pass_filenames: false
- id: shfmt
name: shfmt
description: Run shfmt to format shell scripts
entry: shfmt -w
types: [shell]
language: golang
pass_filenames: True
additional_dependencies: ["mvdan.cc/sh/v3/cmd/[email protected]"]