-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
47 lines (44 loc) · 1.33 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
minimum_pre_commit_version: "2.0.1"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-merge-conflict
- id: check-json
- id: check-symlinks
- id: check-yaml
- id: end-of-file-fixer
- id: no-commit-to-branch
- id: trailing-whitespace
exclude: "^(.*\\.go)$"
- repo: local
hooks:
# run this locally to test out plugin
- id: golangci-lint
name: golangci-lint
description: Fast linters runner for Go.
entry: go run github.com/golangci/golangci-lint/cmd/golangci-lint run --fix
types: [go]
language: golang
pass_filenames: false
- id: gofmts
name: Dogfooding (gofmts)
description: Run gofmts on itself
entry: go run ./cmd/gofmts -l -w
language: system
require_serial: true
types: [go]
exclude: "^(example/example.go|.*/testdata/.*\\.go)$"
- id: generate
name: generate
description: ensure that running go generate changes nothing
types: [go]
language: system
require_serial: true
entry: go generate ./...
- repo: https://github.com/TekWizely/pre-commit-golang
rev: v1.0.0-beta.5
hooks:
- id: go-build-mod
exclude: "^(golangci-lint)"
- id: go-test-mod