-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
58 lines (55 loc) · 1.46 KB
/
.pre-commit-config.yaml
File metadata and controls
58 lines (55 loc) · 1.46 KB
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
58
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
# Go-specific hooks
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-fmt
name: go fmt
description: Run go fmt on files
- id: go-vet
name: go vet
description: Run go vet
- id: go-mod-tidy
name: go mod tidy
description: Run go mod tidy
args: [-diff]
- id: golangci-lint
name: golangci-lint
description: Run golangci-lint
- id: go-build
name: go build
description: Build the project
- id: go-unit-tests
name: go test
description: Run unit tests
args: [-short]
# General hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
name: Trim trailing whitespace
- id: end-of-file-fixer
name: Fix end of files
- id: check-yaml
name: Check YAML syntax
- id: check-added-large-files
name: Check for large files
args: [--maxkb=1000]
- id: check-merge-conflict
name: Check for merge conflicts
- id: check-case-conflict
name: Check for case conflicts
# Configure when to run
default_stages: [pre-commit]
fail_fast: false
# Files to exclude (if needed)
exclude: |
(?x)^(
.*\.pb\.go|
.*\.gen\.go|
vendor/.*|
.*/testdata/.*
)$