Skip to content

Commit 126ddf2

Browse files
committed
Add Pre-commit-hooks
1 parent f66162e commit 126ddf2

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

.pre-commit-config.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
repos:
2+
- repo: https://github.com/tekwizely/pre-commit-golang
3+
rev: v1.0.0-rc.1
4+
hooks:
5+
#
6+
# Go Build
7+
#
8+
#- id: go-build-mod
9+
#- id: go-build-pkg
10+
- id: go-build-repo-mod
11+
#- id: go-build-repo-pkg
12+
##
13+
## Go Mod Tidy
14+
##
15+
#- id: go-mod-tidy
16+
- id: go-mod-tidy-repo
17+
##
18+
## Go Test
19+
##
20+
#- id: go-test-mod
21+
#- id: go-test-pkg
22+
- id: go-test-repo-mod
23+
#- id: go-test-repo-pkg
24+
##
25+
## Go Vet
26+
##
27+
#- id: go-vet
28+
#- id: go-vet-mod
29+
#- id: go-vet-pkg
30+
- id: go-vet-repo-mod
31+
#- id: go-vet-repo-pkg
32+
#
33+
# Revive
34+
#
35+
#- id: go-revive
36+
#- id: go-revive-mod
37+
#- id: go-revive-repo-mod
38+
#
39+
# GoSec
40+
#
41+
#- id: go-sec-mod
42+
#- id: go-sec-pkg
43+
#- id: go-sec-repo-mod
44+
#- id: go-sec-repo-pkg
45+
#
46+
# StaticCheck
47+
#
48+
#- id: go-staticcheck-mod
49+
#- id: go-staticcheck-pkg
50+
#- id: go-staticcheck-repo-mod
51+
#- id: go-staticcheck-repo-pkg
52+
#
53+
# StructSlop
54+
#
55+
#- id: go-structslop-mod
56+
#- id: go-structslop-pkg
57+
#- id: go-structslop-repo-mod
58+
#- id: go-structslop-repo-pkg
59+
#
60+
# Formatters
61+
#
62+
- id: go-fmt-repo
63+
#
64+
# Style Checkers
65+
#
66+
#- id: go-lint
67+
#- id: go-critic
68+
#
69+
# GolangCI-Lint
70+
# - Fast Multi-Linter
71+
# - Can be configured to replace MOST other hooks
72+
# - Supports repo config file for configuration
73+
# - https://github.com/golangci/golangci-lint
74+
#
75+
- id: golangci-lint-repo-mod

0 commit comments

Comments
 (0)