forked from caas-team/GoKubeDownscaler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
47 lines (47 loc) · 1.6 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
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: no-commit-to-branch
args: [--branch, main]
- repo: https://github.com/tekwizely/pre-commit-golang
rev: v1.0.0-rc.1
hooks:
- id: go-mod-tidy-repo
- id: go-test-repo-mod
args: [-race]
- id: go-vet-repo-mod
- id: go-fumpt-repo
args: [-l, -w]
- id: golangci-lint-repo-mod
args: [--config, .golangci.yaml, --, --fix]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.1
hooks:
- id: prettier
files: \.md$
- repo: local
hooks:
- id: prevent-todo-comments
name: prevent todo comments
entry: '\/\/ *(TODO|FIXME)\b' # matches a golang comment beginning with "TODO" or "FIXME"
language: pygrep
files: \.go$
- id: prevent-too-small-headings
name: prevent too small headings
entry: "^#{5,} " # matches a h5 or smaller markdown heading
language: pygrep
files: \.md$
- id: prevent-overly-nested-hierarchy
name: prevent overly nested hierarchy
entry: "^( ){2,}- " # matches a markdown list with 2 or more indentations
language: pygrep
files: \.md$
- id: prevent-invalid-alert-types
name: prevent invalid alert types
entry: '(?i)^> \[!(?!\b(?:NOTE|TIP|IMPORTANT|WARNING|CAUTION)\b).+\]' # matches a github markdown callout/alert that doesn't use one of the supported keywords
language: pygrep
files: \.md$