-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
48 lines (48 loc) · 1.55 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
repos:
# ==========================================================================
# Golang Pre-Commit Hooks | https://github.com/tekwizely/pre-commit-golang
#
# !! ALL Hooks enabled by default - Comment out hooks you are not using
#
# Visit the project home page to learn more about the available Hooks,
# including useful arguments you might want to pass into them.
#
# NOTE: When passing options to hooks, if your options contain a reference
# to an existing file, then you will need to use a trailing '--'
# argument to separate the hook options from the modified-file list
# that Pre-Commit passes into the hook.
# For repo-based hooks, '--' is not needed.
#
# NOTE: You can pass environment variables to hooks using args with the
# following format:
#
# --hook:env:NAME=VALUE
#
# Consider adding aliases to longer-named hooks for easier CLI usage.
# ==========================================================================
- repo: https://github.com/tekwizely/pre-commit-golang
rev: master
hooks:
#
# Go Build
#
- id: go-build-mod
#
# Go Mod Tidy
#
- id: go-mod-tidy
#
# Go Test
#
- id: go-test-mod
# Formatters
#
- id: go-fmt
#
# GolangCI-Lint
# - Fast Multi-Linter
# - Can be configured to replace MOST other hooks
# - Supports repo config file for configuration
# - https://github.com/golangci/golangci-lint
#
- id: golangci-lint-mod