-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.pre-commit-config.yaml
36 lines (33 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
# This file is maintained centrally at
# https://github.com/giantswarm/github/blob/main/languages/go/.pre-commit-config.yaml
minimum_pre_commit_version: '2.17'
repos:
# shell scripts
- repo: https://github.com/detailyang/pre-commit-shell
rev: 1.0.5
hooks:
- id: shell-lint
args: [ --format=json ]
exclude: ".*\\.template"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: detect-private-key
- id: end-of-file-fixer
exclude: ".*testdata/.*"
- id: mixed-line-ending
- id: trailing-whitespace
exclude: ".*testdata/.*"
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-fmt
- id: go-mod-tidy
- id: golangci-lint
# timeout is needed for CI
args: [ -E, gosec, -E, goconst, -E, govet, --timeout, 300s ]
- id: go-imports
args: [ -local, github.com/giantswarm/kubectl-gs ]