-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
57 lines (52 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
48
49
50
51
52
53
54
55
56
57
minimum_pre_commit_version: '2.9.3'
repos:
- repo: https://github.com/pre-commit/pre-commit
rev: v4.0.1
hooks:
- id: validate_manifest
- repo: https://github.com/golangci/golangci-lint
rev: v1.63.3
hooks:
- id: golangci-lint
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-merge-conflict
stages: [pre-commit]
- id: check-symlinks
stages: [pre-commit]
- id: check-yaml
stages: [pre-commit]
- id: end-of-file-fixer
stages: [pre-commit]
- id: trailing-whitespace
stages: [pre-commit]
- id: check-toml
stages: [pre-commit]
- id: mixed-line-ending
stages: [pre-commit]
args: [ --fix=no ]
- repo: https://github.com/markdownlint/markdownlint
rev: v0.12.0
hooks:
- id: markdownlint_docker
stages: [pre-commit]
- repo: local
hooks:
- name: Go Tests
id: go-tests
language: system
files: '\.go$'
pass_filenames: false
entry: go test -timeout 30s -short -v ./...
- name: Go Mod Tidy
id: go-mod-tidy
language: system
pass_filenames: false
entry: go mod tidy
files: '(\.go$|go\.mod|go\.sum)'
- name: Go Generate
id: go-generate
language: system
pass_filenames: false
entry: go generate ./...