generated from mesosphere/golang-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 11
/
.pre-commit-config.yaml
100 lines (99 loc) · 2.34 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Copyright 2021 D2iQ, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
repos:
- repo: https://github.com/tekwizely/pre-commit-golang
rev: v1.0.0-rc.1
hooks:
- id: go-mod-tidy
stages: [commit]
- id: golangci-lint-mod
stages: [commit]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
stages: [commit]
- id: check-yaml
args: ["-m", "--unsafe"]
stages: [commit]
- id: mixed-line-ending
args: ["-f", "lf"]
exclude: \.bat$
stages: [commit]
- id: no-commit-to-branch
stages: [commit]
- id: check-added-large-files
stages: [commit]
- id: check-case-conflict
stages: [commit]
- id: check-merge-conflict
stages: [commit]
- id: check-executables-have-shebangs
stages: [commit]
- id: check-symlinks
stages: [commit]
- id: end-of-file-fixer
stages: [commit]
- repo: https://github.com/rhysd/actionlint
rev: v1.7.1
hooks:
- id: actionlint-system
stages: [commit]
- repo: https://github.com/jorisroovers/gitlint
rev: v0.19.1
hooks:
- id: gitlint
- id: gitlint-ci
args: ["--commits", "origin/main..HEAD"]
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: shfmt
stages: [commit]
args: ["-s", "-i", "2"]
- id: script-must-have-extension
stages: [commit]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
stages: [commit]
args: ["-e", "SC2211"]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
hooks:
- id: markdownlint
stages: [commit]
exclude: ^CHANGELOG.md$
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: insert-license
name: License headers - Go
stages: [commit]
files: "(.*\\.go|go.mod)$"
args:
- --license-filepath
- header.txt
- --comment-style
- //
- --allow-past-years
- id: insert-license
name: License headers - YAML
stages: [commit]
files: \.ya?ml$
args:
- --license-filepath
- header.txt
- --allow-past-years
- id: insert-license
name: License headers - Markdown
stages: [commit]
files: \.md$
exclude: ^CHANGELOG.md$
args:
- --license-filepath
- header.txt
- --comment-style
- <!--|| -->
- --allow-past-years