-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
37 lines (37 loc) · 1.06 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: fix-byte-order-marker
- id: check-added-large-files
args: ["--maxkb=2000"]
- id: mixed-line-ending
- repo: https://github.com/tekwizely/pre-commit-golang
rev: v1.0.0-rc.1
hooks:
# Go Mod Tidy
- id: go-mod-tidy
- id: go-mod-tidy-repo
# Go Build
- id: go-build-mod
- id: go-build-repo-mod
# Go Test
- id: go-test-mod
# Go Vet
- id: go-vet
# GoSec
- id: go-sec-mod
# Formatters
- id: go-fmt
- id: go-fmt-repo
- id: go-fumpt # replaces go-fmt
- id: go-fumpt-repo # replaces go-fmt-repo
- id: go-imports # replaces go-fmt
- id: go-imports-repo # replaces go-fmt-repo
- id: go-returns # replaces go-imports & go-fmt
- id: go-returns-repo # replaces go-imports-repo & go-fmt-repo
# Style Checkers
- id: go-critic